UmaKumpatla commited on
Commit
153a1f2
·
verified ·
1 Parent(s): 0c63cba

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -27
Dockerfile CHANGED
@@ -1,36 +1,19 @@
1
- # Use a slim Python base image
2
- FROM python:3.10-slim
3
 
4
- # Install system dependencies needed for OpenCV
 
 
5
  RUN apt-get update && apt-get install -y \
 
6
  libglib2.0-0 \
7
- libsm6 \
8
- libxrender1 \
9
- libxext6 \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # Set the working directory
13
- WORKDIR /app
14
-
15
- # Copy necessary files into the container
16
- COPY requirements.txt .
17
- COPY streamlit_app.py .
18
-
19
  # Install Python dependencies
 
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
22
- # Expose the port Streamlit uses
23
- EXPOSE 8501
24
-
25
- # Run the app
26
- CMD ["streamlit", "run", "streamlit_app.py"]
27
-
28
-
29
- FROM python:3.10-slim
30
-
31
- COPY requirements.txt .
32
- RUN pip install -r requirements.txt
33
-
34
- COPY streamlit_app.py .
35
 
36
- CMD ["streamlit", "run", "streamlit_app.py"]
 
 
1
+ FROM python:3.9-slim
 
2
 
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies required by OpenCV
6
  RUN apt-get update && apt-get install -y \
7
+ libgl1 \
8
  libglib2.0-0 \
 
 
 
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
 
 
 
 
 
 
11
  # Install Python dependencies
12
+ COPY requirements.txt ./
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
+ # Copy app files
16
+ COPY . .
 
 
 
 
 
 
 
 
 
 
 
17
 
18
+ # Start Streamlit app
19
+ CMD ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]