Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +7 -7
Dockerfile
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
#
|
2 |
FROM python:3.9
|
3 |
|
4 |
-
#
|
5 |
WORKDIR /code
|
6 |
|
7 |
-
#
|
8 |
RUN apt-get update && apt-get install -y libgl1 && apt-get clean
|
9 |
|
10 |
-
#
|
11 |
COPY ./requirements.txt /code/requirements.txt
|
12 |
|
13 |
-
#
|
14 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
15 |
|
16 |
-
#
|
17 |
COPY . /code
|
18 |
|
19 |
-
# CMD
|
20 |
CMD ["gunicorn", "main:app", "-b", "0.0.0.0:7860"]
|
|
|
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"]
|