nielitropar commited on
Commit
ccd37d0
·
verified ·
1 Parent(s): 6e10b8d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -11
Dockerfile CHANGED
@@ -1,17 +1,20 @@
1
- # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
- # you will also find guides on how best to write your Dockerfile
3
 
4
- FROM python:3.9-slim
 
5
 
6
- WORKDIR /app
 
7
 
8
- COPY requirements.txt .
9
- RUN pip install -r requirements.txt
10
 
11
- # Copy templates/ and app.py
12
- COPY . .
13
 
 
 
14
 
15
- EXPOSE 5000
16
-
17
- 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", "main:app", "-b", "0.0.0.0:7860"]