-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
83 lines (67 loc) · 2.03 KB
/
Copy pathDockerfile
File metadata and controls
83 lines (67 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Stage 1: Build C++ tools
FROM ubuntu:24.04 AS builder
RUN apt-get update -y && apt-get install -y \
build-essential \
cmake \
git \
libeigen3-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /local
# Build libcifpp
RUN git clone https://github.com/PDB-REDO/libcifpp.git
WORKDIR /local/libcifpp
RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build
RUN cmake --install build
# Build libmcfp
WORKDIR /local
RUN git clone https://github.com/mhekkel/libmcfp.git
WORKDIR /local/libmcfp
RUN cmake -S . -B build
RUN cmake --build build --config Release
RUN cmake --install build
# Build dssp
WORKDIR /local
RUN git clone https://github.com/PDB-REDO/dssp.git
WORKDIR /local/dssp
RUN cmake -S . -B build
RUN cmake --build build --config Release
RUN cmake --install build
# Stage 2: Main image
FROM ubuntu:24.04 AS runtime
# Install system dependencies
RUN apt-get update && \
apt-get install -y \
curl \
openjdk-17-jre-headless \
git \
wget \
python3.12 \
python3.12-venv \
python3-pip \
npm \
nodejs \
jq \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Set python3.12 as default python
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1
# Install Mol*
RUN npm install -g molstar
# Setup Nextflow
RUN mkdir -p /usr/local/bin && curl -s https://get.nextflow.io | bash -s -- && \
mv nextflow /usr/local/bin/nextflow && chmod +x /usr/local/bin/nextflow
# Copy C++ tools from builder
COPY --from=builder /usr/local /usr/local
WORKDIR /app
# Download latest ModelCIF dictionary
RUN wget https://raw.githubusercontent.com/ihmwg/ModelCIF/refs/heads/master/dist/mmcif_ma.dic
# Copy Python dependency files
COPY pyproject.toml requirements.txt uv.lock ./
RUN pip install --break-system-packages uv
RUN uv pip install --system --no-cache-dir --break-system-packages -r requirements.txt
# Copy the rest of the application code
COPY . .
# Default command
CMD ["python", "main.py", "--help"]