LovnishVerma commited on
Commit
93308f9
·
verified ·
1 Parent(s): d5fc9e6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -5
Dockerfile CHANGED
@@ -1,10 +1,20 @@
 
1
  FROM python:3.9
2
 
3
- WORKDIR /app
 
4
 
5
- COPY requirements.txt ./
6
- RUN pip install -r requirements.txt
7
 
8
- COPY . .
 
9
 
10
- CMD ["python", "app.py"]
 
 
 
 
 
 
 
 
1
+ # Using Python 3.9 base image
2
  FROM python:3.9
3
 
4
+ # Set the working directory to /code
5
+ WORKDIR /code
6
 
7
+ # Install necessary system dependencies, including libGL.so.1
8
+ RUN apt-get update && apt-get install -y libgl1 && apt-get clean
9
 
10
+ # Copy requirements.txt to /code
11
+ COPY ./requirements.txt /code/requirements.txt
12
 
13
+ # Install dependencies from requirements.txt
14
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
15
+
16
+ # Copy the entire project content to /code
17
+ COPY . /code
18
+
19
+ # CMD to run Gunicorn
20
+ CMD ["gunicorn", "app:app", "-b", "0.0.0.0:7860"]