Spaces:
Running
Running
File size: 2,160 Bytes
cc46ba8 3185bdc cc46ba8 7047b3f cc46ba8 3185bdc 7047b3f cc46ba8 3185bdc 7047b3f cc46ba8 3185bdc 7047b3f 3185bdc 7047b3f 3185bdc 7047b3f 3185bdc 7047b3f 3185bdc 7047b3f 3185bdc 7047b3f cc46ba8 7047b3f cc46ba8 7047b3f 3185bdc cc46ba8 7047b3f 3185bdc | 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 | # 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"] |