Bilal443 commited on
Commit
8c29bc6
·
verified ·
1 Parent(s): 718bdeb

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -4
Dockerfile CHANGED
@@ -1,20 +1,44 @@
 
 
 
1
  FROM python:3.13.5-slim
2
 
 
 
 
3
  WORKDIR /app
4
 
 
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
8
  git \
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
 
 
11
  COPY requirements.txt ./
12
- COPY src/ ./src/
13
 
14
- RUN pip3 install -r requirements.txt
 
 
 
15
 
 
 
 
16
  EXPOSE 8501
17
 
18
- HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
 
 
 
19
 
20
- ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
 
 
 
1
+ # ===============================
2
+ # Base Image
3
+ # ===============================
4
  FROM python:3.13.5-slim
5
 
6
+ # ===============================
7
+ # Set Working Directory
8
+ # ===============================
9
  WORKDIR /app
10
 
11
+ # ===============================
12
+ # Install Dependencies
13
+ # ===============================
14
  RUN apt-get update && apt-get install -y \
15
  build-essential \
16
  curl \
17
  git \
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
+ # ===============================
21
+ # Copy Files
22
+ # ===============================
23
  COPY requirements.txt ./
24
+ COPY . .
25
 
26
+ # ===============================
27
+ # Install Python Packages
28
+ # ===============================
29
+ RUN pip3 install --no-cache-dir -r requirements.txt
30
 
31
+ # ===============================
32
+ # Expose Port
33
+ # ===============================
34
  EXPOSE 8501
35
 
36
+ # ===============================
37
+ # Healthcheck (Optional but Recommended)
38
+ # ===============================
39
+ HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
40
 
41
+ # ===============================
42
+ # Launch Streamlit App
43
+ # ===============================
44
+ ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]