Spaces:
Sleeping
Sleeping
Download Dockerfile from snehasis19/AbStrPred: direct link, hf CLI and curl.
- Browser
- Download file 2.16 kB
-
https://huggingface.co/spaces/snehasis19/AbStrPred/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/snehasis19/AbStrPred/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/snehasis19/AbStrPred/resolve/main/Dockerfile
2.16 kB
| # Use Python 3.10 slim image | |
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| ncbi-blast+ \ | |
| git \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # ========================================================= | |
| # APPLICATION | |
| # ========================================================= | |
| COPY app.py . | |
| # ========================================================= | |
| # FRONTEND | |
| # ========================================================= | |
| COPY static/ ./static/ | |
| COPY templates/ ./templates/ | |
| # ========================================================= | |
| # MACHINE LEARNING MODELS | |
| # ========================================================= | |
| COPY label_encoder.pkl . | |
| COPY best_model_LR.sav . | |
| # ========================================================= | |
| # BLAST DATABASE | |
| # ========================================================= | |
| COPY pathway_db.pdb . | |
| COPY pathway_db.phr . | |
| COPY pathway_db.pin . | |
| COPY pathway_db.pot . | |
| COPY pathway_db.psq . | |
| COPY pathway_db.ptf . | |
| COPY pathway_db.pto . | |
| # ========================================================= | |
| # PATHWAY MAPPING | |
| # ========================================================= | |
| COPY pathway_map.csv . | |
| # ========================================================= | |
| # TEMPORARY DIRECTORIES | |
| # ========================================================= | |
| RUN mkdir -p /app/data /app/temp /app/uploads | |
| # ========================================================= | |
| # PORT | |
| # ========================================================= | |
| EXPOSE 7860 | |
| # ========================================================= | |
| # HEALTH CHECK | |
| # ========================================================= | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \ | |
| CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860').read()" | |
| # ========================================================= | |
| # START | |
| # ========================================================= | |
| CMD ["python", "app.py"] |