Spaces:
Sleeping
Sleeping
sakshamlakhera
commited on
Commit
·
509f10e
1
Parent(s):
eb6667d
docker fix cache4
Browse files- Dockerfile +3 -4
Dockerfile
CHANGED
|
@@ -12,10 +12,11 @@ RUN apt-get update && apt-get install -y \
|
|
| 12 |
# Set safe environment paths for Streamlit and Torch
|
| 13 |
ENV STREAMLIT_HOME="/.streamlit"
|
| 14 |
ENV TORCH_HOME="/.cache/torch"
|
|
|
|
| 15 |
|
| 16 |
# Create writable directories
|
| 17 |
-
RUN mkdir -p $
|
| 18 |
-
&& chmod -R 777 $
|
| 19 |
|
| 20 |
# Copy app code
|
| 21 |
COPY . .
|
|
@@ -30,8 +31,6 @@ EXPOSE 7860
|
|
| 30 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
|
| 31 |
|
| 32 |
ENV STREAMLIT_SERVER_ENABLECORS=false
|
| 33 |
-
ENV STREAMLIT_SERVER_HEADLESS=true
|
| 34 |
-
ENV STREAMLIT_BROWSER_GATHERUSAGESTATS=false
|
| 35 |
|
| 36 |
# Run Streamlit
|
| 37 |
ENTRYPOINT ["streamlit", "run", "Home.py", "--server.port=7860", "--server.address=0.0.0.0"]
|
|
|
|
| 12 |
# Set safe environment paths for Streamlit and Torch
|
| 13 |
ENV STREAMLIT_HOME="/.streamlit"
|
| 14 |
ENV TORCH_HOME="/.cache/torch"
|
| 15 |
+
ENV GDOWN_HOME="/.cache/gdown/"
|
| 16 |
|
| 17 |
# Create writable directories
|
| 18 |
+
RUN mkdir -p $XDG_CACHE_HOME $TORCH_HOME $GDOWN_CACHE_DIR /assets \
|
| 19 |
+
&& chmod -R 777 $XDG_CACHE_HOME $TORCH_HOME $GDOWN_CACHE_DIR /assets
|
| 20 |
|
| 21 |
# Copy app code
|
| 22 |
COPY . .
|
|
|
|
| 31 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
|
| 32 |
|
| 33 |
ENV STREAMLIT_SERVER_ENABLECORS=false
|
|
|
|
|
|
|
| 34 |
|
| 35 |
# Run Streamlit
|
| 36 |
ENTRYPOINT ["streamlit", "run", "Home.py", "--server.port=7860", "--server.address=0.0.0.0"]
|