Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -3
Dockerfile
CHANGED
@@ -18,14 +18,19 @@ RUN pip3 install --no-cache-dir -r requirements.txt
|
|
18 |
ENV HOME=/app
|
19 |
ENV TRANSFORMERS_CACHE=/app/.cache/huggingface/hub
|
20 |
|
21 |
-
# 4) Fix permissions on both folders *after* copying them
|
22 |
-
RUN chmod -R a+rwx /app/.streamlit /app/.cache/huggingface
|
23 |
|
24 |
# Copy app and support folders
|
25 |
COPY app.py ./
|
26 |
COPY utils/ ./utils/
|
27 |
COPY models/ ./models/
|
28 |
-
COPY .streamlit/ .streamlit/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
EXPOSE 8501
|
31 |
|
|
|
18 |
ENV HOME=/app
|
19 |
ENV TRANSFORMERS_CACHE=/app/.cache/huggingface/hub
|
20 |
|
|
|
|
|
21 |
|
22 |
# Copy app and support folders
|
23 |
COPY app.py ./
|
24 |
COPY utils/ ./utils/
|
25 |
COPY models/ ./models/
|
26 |
+
COPY .streamlit/ .streamlit/
|
27 |
+
|
28 |
+
# 1) Create the cache dir
|
29 |
+
RUN mkdir -p /app/.streamlit/cache \
|
30 |
+
&& chmod -R a+rwx /app/.streamlit
|
31 |
+
|
32 |
+
# 2) Tell Streamlit where to put its cache
|
33 |
+
ENV XDG_CACHE_HOME=/app/.streamlit
|
34 |
|
35 |
EXPOSE 8501
|
36 |
|