Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +11 -1
Dockerfile
CHANGED
@@ -1,14 +1,24 @@
|
|
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
|
5 |
|
|
|
6 |
WORKDIR /code
|
7 |
|
|
|
|
|
8 |
|
9 |
-
|
|
|
|
|
|
|
10 |
RUN pip install uvicorn torch torchvision numpy>=1.16.5 scipy>=1.3.0 opencv-python gdown Pillow gradio
|
11 |
|
|
|
12 |
COPY . .
|
13 |
|
|
|
14 |
CMD ["python", "code/demo.py"]
|
|
|
|
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 |
+
# Base image
|
5 |
FROM python:3.9
|
6 |
|
7 |
+
# Set the working directory in the container
|
8 |
WORKDIR /code
|
9 |
|
10 |
+
# Copy the requirements file into the container at /code
|
11 |
+
COPY code/requirements.txt /code/
|
12 |
|
13 |
+
# Install any needed packages specified in requirements.txt
|
14 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
15 |
+
|
16 |
+
# Install additional packages
|
17 |
RUN pip install uvicorn torch torchvision numpy>=1.16.5 scipy>=1.3.0 opencv-python gdown Pillow gradio
|
18 |
|
19 |
+
# Copy the rest of your application's code
|
20 |
COPY . .
|
21 |
|
22 |
+
# Command to run the application
|
23 |
CMD ["python", "code/demo.py"]
|
24 |
+
|