snehasis19 commited on
Commit
3185bdc
·
verified ·
1 Parent(s): a579008

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -7
Dockerfile CHANGED
@@ -4,7 +4,7 @@ FROM python:3.10-slim
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Install system dependencies (for BLAST, bioinformatics tools)
8
  RUN apt-get update && apt-get install -y \
9
  ncbi-blast+ \
10
  git \
@@ -17,23 +17,43 @@ COPY requirements.txt .
17
  # Install Python dependencies
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
- # Copy application code (exclude large data files)
21
  COPY app.py .
22
  COPY app_new.py .
 
 
23
  COPY static/ ./static/
24
  COPY templates/ ./templates/
 
 
25
  COPY label_encoder.pkl .
26
  COPY best_model_LR.sav .
27
 
28
- # Create directories for temp data
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  RUN mkdir -p /app/data /app/temp /app/uploads
30
 
31
- # Expose port
32
  EXPOSE 7860
33
 
34
  # Health check
35
- HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
36
  CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860').read()"
37
 
38
- # Run app (Hugging Face uses port 7860)
39
- CMD ["python", "app.py"]
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install system dependencies
8
  RUN apt-get update && apt-get install -y \
9
  ncbi-blast+ \
10
  git \
 
17
  # Install Python dependencies
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
+ # Copy application
21
  COPY app.py .
22
  COPY app_new.py .
23
+
24
+ # Copy frontend
25
  COPY static/ ./static/
26
  COPY templates/ ./templates/
27
+
28
+ # Copy ML model files
29
  COPY label_encoder.pkl .
30
  COPY best_model_LR.sav .
31
 
32
+ # =========================================================
33
+ # COPY BLAST DATABASE
34
+ # =========================================================
35
+ COPY pathway_db.phr .
36
+ COPY pathway_db.pin .
37
+ COPY pathway_db.psq .
38
+ COPY pathway_db.pdb .
39
+ COPY pathway_db.pot .
40
+ COPY pathway_db.ptf .
41
+ COPY pathway_db.pto .
42
+
43
+ # =========================================================
44
+ # COPY PATHWAY MAPPING FILE
45
+ # =========================================================
46
+ COPY pathway_map.csv .
47
+
48
+ # Create directories for temporary data
49
  RUN mkdir -p /app/data /app/temp /app/uploads
50
 
51
+ # Expose Hugging Face port
52
  EXPOSE 7860
53
 
54
  # Health check
55
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
56
  CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860').read()"
57
 
58
+ # Start application
59
+ CMD ["python", "app.py"]