Gagan0141 commited on
Commit
88b56d4
·
verified ·
1 Parent(s): 2ab4e09

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -10
Dockerfile CHANGED
@@ -1,19 +1,25 @@
1
- # Base image with Python
2
- FROM python:3.11-slim
 
 
 
 
 
 
 
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Copy requirements and install dependencies
8
- COPY requirements.txt .
9
- RUN pip install --no-cache-dir --upgrade pip
10
- RUN pip install --no-cache-dir -r requirements.txt
11
 
12
- # Copy project files
13
- COPY . .
14
 
15
- # Expose Streamlit default port
16
  EXPOSE 8501
17
 
18
- # Command to run Streamlit app
19
  CMD ["streamlit", "run", "2.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
+ FROM python:3.10-slim
2
+
3
+ # Install system dependencies for OpenCV
4
+ RUN apt-get update && apt-get install -y \
5
+ libglib2.0-0 \
6
+ libsm6 \
7
+ libxrender1 \
8
+ libxext6 \
9
+ && rm -rf /var/lib/apt/lists/*
10
 
11
  # Set working directory
12
  WORKDIR /app
13
 
14
+ # Copy app and requirements
15
+ COPY 2.py /app/2.py
16
+ COPY requirements.txt /app/requirements.txt
 
17
 
18
+ # Install Python dependencies
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
 
21
+ # Expose Streamlit port
22
  EXPOSE 8501
23
 
24
+ # Run the Streamlit app
25
  CMD ["streamlit", "run", "2.py", "--server.port=8501", "--server.address=0.0.0.0"]