Spaces:
Running
Running
Download bioai-platform/backend/Dockerfile from Samad14/bio-nexus-api: direct link, hf CLI and curl.
- Browser
- Download file 2.14 kB
-
https://huggingface.co/spaces/Samad14/bio-nexus-api/resolve/main/bioai-platform/backend/Dockerfile
- Command line
-
hf download hf://spaces/Samad14/bio-nexus-api/bioai-platform/backend/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Samad14/bio-nexus-api/resolve/main/bioai-platform/backend/Dockerfile
2.14 kB
| # 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}"] | |