Faysal4200 commited on
Commit
536145d
·
verified ·
1 Parent(s): be8039d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -20
Dockerfile CHANGED
@@ -1,20 +1,28 @@
1
- # Use official Python slim image
2
- FROM python:3.11.13-slim
3
-
4
- # Set working directory
5
- WORKDIR /app
6
-
7
- # Copy requirements first (for caching)
8
- COPY requirements.txt .
9
-
10
- # Install dependencies
11
- RUN pip install --no-cache-dir -r requirements.txt
12
-
13
- # Copy all app files
14
- COPY . .
15
-
16
- # Expose Streamlit default port
17
- EXPOSE 7860
18
-
19
- # Command to run your Streamlit app
20
- CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.headless=true"]
 
 
 
 
 
 
 
 
 
1
+ # Use official Python slim image
2
+ FROM python:3.11.13-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ RUN apt-get update && apt-get install -y \
8
+ build-essential \
9
+ curl \
10
+ git \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ # Copy requirements first (for caching)
14
+ COPY requirements.txt .
15
+
16
+ # Install dependencies
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+
19
+ # Copy all app files
20
+ COPY . .
21
+
22
+ # Expose Streamlit default port
23
+ EXPOSE 8501
24
+
25
+ HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
26
+
27
+ # Command to run your Streamlit app
28
+ ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]