Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +12 -0
Dockerfile
CHANGED
@@ -22,3 +22,15 @@ COPY . /app
|
|
22 |
# Spaces auto-assigns $PORT; Gradio binds to it automatically
|
23 |
EXPOSE 7860
|
24 |
CMD ["python", "app.py"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
# Spaces auto-assigns $PORT; Gradio binds to it automatically
|
23 |
EXPOSE 7860
|
24 |
CMD ["python", "app.py"]
|
25 |
+
|
26 |
+
# Create a shared writable cache dir for HF + Gradio
|
27 |
+
RUN mkdir -p /data/.cache/huggingface/transformers /data/.cache/huggingface/hub /data/gradio && \
|
28 |
+
chmod -R 777 /data
|
29 |
+
|
30 |
+
# Route caches to /data
|
31 |
+
ENV HF_HOME=/data/.cache/huggingface
|
32 |
+
ENV TRANSFORMERS_CACHE=/data/.cache/huggingface/transformers
|
33 |
+
ENV HF_HUB_CACHE=/data/.cache/huggingface/hub
|
34 |
+
ENV GRADIO_TEMP_DIR=/data/gradio
|
35 |
+
ENV GRADIO_CACHE_DIR=/data/gradio
|
36 |
+
|