admin08077 commited on
Commit
d7f5844
·
verified ·
1 Parent(s): 0265d97

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -7
Dockerfile CHANGED
@@ -1,24 +1,31 @@
1
- # Start with a base image that includes Python
 
 
2
  FROM python:3.10-slim
3
 
4
- # Install required system packages
5
  RUN apt-get update && apt-get install -y \
6
  libzbar0 \
 
7
  ffmpeg \
8
  libsm6 \
9
  libxext6 \
10
  cmake \
 
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Set up the working directory
14
  WORKDIR /app
15
 
16
- # Copy requirements.txt and install Python dependencies
17
  COPY requirements.txt .
18
- RUN pip install -r requirements.txt
19
 
20
- # Copy the rest of the application code
21
  COPY . .
22
 
 
 
 
23
  # Run the application
24
- CMD ["streamlit", "run", "app.py"]
 
1
+ # Dockerfile
2
+
3
+ # Use the official Python image
4
  FROM python:3.10-slim
5
 
6
+ # Install system dependencies
7
  RUN apt-get update && apt-get install -y \
8
  libzbar0 \
9
+ libgl1-mesa-glx \
10
  ffmpeg \
11
  libsm6 \
12
  libxext6 \
13
  cmake \
14
+ git \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
+ # Set the working directory
18
  WORKDIR /app
19
 
20
+ # Copy the requirements file and install dependencies
21
  COPY requirements.txt .
22
+ RUN pip install --no-cache-dir -r requirements.txt
23
 
24
+ # Copy the application code
25
  COPY . .
26
 
27
+ # Expose the port
28
+ EXPOSE 7860
29
+
30
  # Run the application
31
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]