File size: 2,139 Bytes
0f780df
 
76fb273
07e58f6
4939f56
8e3419e
2fe9546
07e58f6
2fe9546
4939f56
c7878ad
 
4939f56
 
2fe9546
 
8438ee1
2fe9546
 
 
07e58f6
aad6f8e
 
 
8438ee1
aad6f8e
 
 
 
fb8c550
348f224
fb8c550
 
76fb273
 
 
bd95b9f
b281340
be36a29
bd95b9f
76fb273
 
2f3ea25
b281340
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
# bookworm pin = gcc 12; trixie's gcc 14 turns fpocket's legacy C warnings into hard errors
FROM python:3.11-slim-bookworm

RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential gcc g++ wget ca-certificates git libnetcdf-dev \
    openbabel libgl1 libgomp1 libopenblas-dev \
    libxml2 libxslt1.1 samtools && \
    rm -rf /var/lib/apt/lists/*

# fpocket (pocket detection) — not packaged in Debian repos; build from source
# NOTE: tags carry no "v" prefix (4.2.3, not v4.2.3) — a wrong prefix kills the build
RUN git clone --depth 1 --branch 4.2.3 https://github.com/Discngine/fpocket /tmp/fpocket && \
    make -C /tmp/fpocket && make -C /tmp/fpocket install && \
    rm -rf /tmp/fpocket
# minimap2 (for NGS read alignment)
RUN wget -q https://github.com/lh3/minimap2/releases/download/v2.28/minimap2-2.28_x64-linux.tar.bz2 -O /tmp/minimap2.tar.bz2 && \
    tar xjf /tmp/minimap2.tar.bz2 -C /tmp --no-same-owner && \
    cp /tmp/minimap2-2.28_x64-linux/minimap2 /usr/local/bin/minimap2 && \
    chmod +x /usr/local/bin/minimap2 && \
    rm -rf /tmp/minimap2*

# Download pre-compiled PhyML binary from bioconda
RUN wget -qO /tmp/phyml.tar.bz2 \
      https://anaconda.org/bioconda/phyml/3.3.20220408/download/linux-64/phyml-3.3.20220408-h9bc3f66_3.tar.bz2 && \
    tar xjf /tmp/phyml.tar.bz2 -C /tmp --no-same-owner && \
    cp /tmp/bin/phyml /usr/local/bin/phyml && \
    chmod +x /usr/local/bin/phyml && \
    rm -rf /tmp/phyml.tar.bz2 /tmp/bin

# Download pre-compiled AutoDock Vina binary from GitHub releases
RUN wget -q "https://github.com/ccsb-scripps/AutoDock-Vina/releases/download/v1.2.7/vina_1.2.7_linux_x86_64" -O /usr/local/bin/vina && \
    chmod +x /usr/local/bin/vina

WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# primer3-py is optional — skip silently if it fails
RUN pip install --no-cache-dir "primer3-py>=2.0.3" 2>/dev/null || echo "primer3-py skipped (optional)"

COPY . .

EXPOSE 7860
CMD ["sh", "-c", "python -c 'import openmm; print(\"OpenMM\", openmm.__version__)' && uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-7860}"]