UmaKumpatla commited on
Commit
4675968
·
verified ·
1 Parent(s): 2538168

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -7
Dockerfile CHANGED
@@ -1,6 +1,7 @@
 
1
  FROM python:3.10-slim
2
 
3
- # Install required system libraries for OpenCV
4
  RUN apt-get update && apt-get install -y \
5
  libglib2.0-0 \
6
  libsm6 \
@@ -8,12 +9,19 @@ RUN apt-get update && apt-get install -y \
8
  libxext6 \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
- # Copy and install Python dependencies
 
 
 
12
  COPY requirements.txt .
13
- RUN pip install -r requirements.txt
14
 
15
- # Copy app files
16
- COPY . /app
17
- WORKDIR /app
 
 
 
 
 
18
 
19
- CMD ["streamlit", "run", "streamlit_app.py"]
 
1
+ # Use a lightweight Python 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 \
 
9
  libxext6 \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Set working directory
13
+ WORKDIR /app
14
+
15
+ # Copy files into the container
16
  COPY requirements.txt .
17
+ COPY app.py .
18
 
19
+ # Install Python dependencies
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
+
22
+ # Expose the port Streamlit runs on
23
+ EXPOSE 8501
24
+
25
+ # Run the app
26
+ CMD ["streamlit", "run", "app.py"]
27