Spaces:
Sleeping
Sleeping
docker file updated
Browse files- Dockerfile +19 -5
Dockerfile
CHANGED
@@ -1,14 +1,28 @@
|
|
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 |
-
COPY ./requirements.txt /code/requirements.txt
|
9 |
|
10 |
-
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
COPY . .
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
# COPY ./requirements.txt /code/requirements.txt
|
9 |
|
10 |
+
# RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
|
12 |
+
# COPY . .
|
13 |
+
|
14 |
+
# CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|
15 |
+
# Use the official Python 3.10.9 image
|
16 |
+
FROM python:3.10.9
|
17 |
+
|
18 |
+
# Copy the current directory contents into the container at .
|
19 |
COPY . .
|
20 |
|
21 |
+
# Set the working directory to /
|
22 |
+
WORKDIR /
|
23 |
+
|
24 |
+
# Install requirements.txt
|
25 |
+
RUN pip install --no-cache-dir --upgrade -r /requirements.txt
|
26 |
+
|
27 |
+
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
28 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|