ehsanhon commited on
Commit
dd99d0b
·
verified ·
1 Parent(s): a4cb099

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -20
Dockerfile CHANGED
@@ -1,20 +1,23 @@
1
- # Use a lightweight Python image
2
- FROM python:3.9-slim
3
-
4
- # Set the working directory
5
- WORKDIR /app
6
-
7
- # Copy dependency list first (for Docker caching)
8
- COPY requirements.txt requirements.txt
9
-
10
- # Install dependencies
11
- RUN pip install --no-cache-dir -r requirements.txt
12
-
13
- # Copy the rest of the app files
14
- COPY . .
15
-
16
- # Expose the port your Flask app runs on
17
- EXPOSE 7860
18
-
19
- # Run the app
20
- CMD ["python", "app.py"]
 
 
 
 
1
+ # Use a lightweight Python image
2
+ FROM python:3.9-slim
3
+
4
+ # Install system-level dependencies
5
+ RUN apt-get update && apt-get install -y libgl1 && rm -rf /var/lib/apt/lists/*
6
+
7
+ # Set the working directory
8
+ WORKDIR /app
9
+
10
+ # Copy dependency list first (for Docker caching)
11
+ COPY requirements.txt requirements.txt
12
+
13
+ # Install Python dependencies
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Copy the rest of the app files
17
+ COPY . .
18
+
19
+ # Expose the port your Flask app runs on
20
+ EXPOSE 7860
21
+
22
+ # Run the app
23
+ CMD ["python", "app.py"]