Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -3
Dockerfile
CHANGED
@@ -2,13 +2,16 @@ FROM python:3.9
|
|
2 |
|
3 |
WORKDIR /code
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
COPY ./requirements.txt /code/requirements.txt
|
6 |
|
7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
|
9 |
COPY ./app.py /code/app.py
|
10 |
|
11 |
-
# Ensure /code has the correct permissions
|
12 |
-
RUN chmod -R 777 /code
|
13 |
-
|
14 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
2 |
|
3 |
WORKDIR /code
|
4 |
|
5 |
+
# Create the cache directory
|
6 |
+
RUN mkdir -p /code/hf_cache
|
7 |
+
|
8 |
+
# Set the HF_HOME environment variable to the cache directory
|
9 |
+
ENV HF_HOME=/code/hf_cache
|
10 |
+
|
11 |
COPY ./requirements.txt /code/requirements.txt
|
12 |
|
13 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
14 |
|
15 |
COPY ./app.py /code/app.py
|
16 |
|
|
|
|
|
|
|
17 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|