Spaces:
Runtime error
Runtime error
Commit
·
cad4da6
1
Parent(s):
8842208
Add application file
Browse files- Dockerfile +5 -1
Dockerfile
CHANGED
@@ -4,6 +4,11 @@ FROM python:3.9
|
|
4 |
# Set the working directory inside the container
|
5 |
WORKDIR /code
|
6 |
|
|
|
|
|
|
|
|
|
|
|
7 |
# Copy the requirements file into the container
|
8 |
COPY ./requirements.txt /code/requirements.txt
|
9 |
|
@@ -17,5 +22,4 @@ COPY ./app.py /code/app.py
|
|
17 |
EXPOSE 8000
|
18 |
|
19 |
# The command to run your FastAPI app using uvicorn
|
20 |
-
# This will be run when the container starts
|
21 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
4 |
# Set the working directory inside the container
|
5 |
WORKDIR /code
|
6 |
|
7 |
+
# --- ADD THIS LINE ---
|
8 |
+
# Set the cache directory to a writable location inside the container
|
9 |
+
ENV HF_HOME /code/cache
|
10 |
+
# --------------------
|
11 |
+
|
12 |
# Copy the requirements file into the container
|
13 |
COPY ./requirements.txt /code/requirements.txt
|
14 |
|
|
|
22 |
EXPOSE 8000
|
23 |
|
24 |
# The command to run your FastAPI app using uvicorn
|
|
|
25 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|