Update Dockerfile
Browse files- Dockerfile +8 -0
Dockerfile
CHANGED
@@ -17,6 +17,14 @@ RUN apt-get update && apt-get install -y \
|
|
17 |
RUN pip install --upgrade pip
|
18 |
RUN pip install -r requirements.txt
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
# Expose the port your FastAPI app will run on (7860 is standard on Hugging Face Spaces)
|
21 |
EXPOSE 7860
|
22 |
|
|
|
17 |
RUN pip install --upgrade pip
|
18 |
RUN pip install -r requirements.txt
|
19 |
|
20 |
+
# create cache folder with write permissions
|
21 |
+
RUN mkdir -p /app/.cache/huggingface && chmod -R 777 /app/.cache/huggingface
|
22 |
+
|
23 |
+
# set environment variables for huggingface cache
|
24 |
+
ENV HF_HOME=/app/.cache/huggingface
|
25 |
+
ENV TRANSFORMERS_CACHE=/app/.cache/huggingface/transformers
|
26 |
+
ENV HF_DATASETS_CACHE=/app/.cache/huggingface/datasets
|
27 |
+
|
28 |
# Expose the port your FastAPI app will run on (7860 is standard on Hugging Face Spaces)
|
29 |
EXPOSE 7860
|
30 |
|