mahmoudalrefaey commited on
Commit
6409991
·
verified ·
1 Parent(s): f4c4a31

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +34 -28
Dockerfile CHANGED
@@ -1,29 +1,35 @@
1
- # Use an official Python base image
2
- FROM python:3.9-slim
3
-
4
- # Set environment variables
5
- ENV PORT 7860
6
- ENV PYTHONUNBUFFERED=1
7
-
8
- # Set workdir
9
- WORKDIR /app
10
-
11
- # Install system dependencies (if needed)
12
- RUN apt-get update && apt-get install -y \
13
- build-essential \
14
- libgl1 \
15
- && rm -rf /var/lib/apt/lists/*
16
-
17
- # Copy requirements and install Python dependencies
18
- COPY requirements.txt .
19
- RUN pip install --upgrade pip
20
- RUN pip install -r requirements.txt
21
-
22
- # Copy the rest of your code
23
- COPY . .
24
-
25
- # Expose the port Streamlit will run on
26
- EXPOSE 7860
27
-
28
- # Run Streamlit on container start
 
 
 
 
 
 
29
  CMD streamlit run app.py --server.port $PORT --server.address 0.0.0.0
 
1
+ # Use an official Python base image
2
+ FROM python:3.9-slim
3
+
4
+ # Set environment variables
5
+ ENV PORT 7860
6
+ ENV PYTHONUNBUFFERED=1
7
+
8
+ # Set workdir
9
+ WORKDIR /app
10
+
11
+ # Install system dependencies (if needed)
12
+ RUN apt-get update && apt-get install -y \
13
+ build-essential \
14
+ libgl1 \
15
+ libglib2.0-0 \
16
+ libsm6 \
17
+ libxext6 \
18
+ libxrender1 \
19
+ ffmpeg \
20
+ ca-certificates \
21
+ && rm -rf /var/lib/apt/lists/*
22
+
23
+ # Copy requirements and install Python dependencies
24
+ COPY requirements.txt .
25
+ RUN pip install --upgrade pip
26
+ RUN pip install -r requirements.txt
27
+
28
+ # Copy the rest of your code
29
+ COPY . .
30
+
31
+ # Expose the port Streamlit will run on
32
+ EXPOSE 7860
33
+
34
+ # Run Streamlit on container start
35
  CMD streamlit run app.py --server.port $PORT --server.address 0.0.0.0