Alamgirapi commited on
Commit
d87ad37
·
verified ·
1 Parent(s): 9fa42c1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -1
Dockerfile CHANGED
@@ -1,6 +1,26 @@
1
  FROM python:3.11-slim
 
2
  WORKDIR /app
 
 
3
  COPY requirements.txt .
 
 
 
 
 
 
 
4
  RUN pip install --no-cache-dir -r requirements.txt
 
 
5
  COPY . .
6
- CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
 
 
 
 
 
 
 
 
1
  FROM python:3.11-slim
2
+
3
  WORKDIR /app
4
+
5
+ # Copy requirements first for better caching
6
  COPY requirements.txt .
7
+
8
+ # Install system dependencies if needed
9
+ RUN apt-get update && apt-get install -y \
10
+ build-essential \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ # Install Python dependencies
14
  RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Copy the rest of the application
17
  COPY . .
18
+
19
+ # Expose the port
20
+ EXPOSE 8501
21
+
22
+ # Health check
23
+ HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
24
+
25
+ # Run the application
26
+ CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]