dejanseo commited on
Commit
22f53ff
·
verified ·
1 Parent(s): 7447c5f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -1
Dockerfile CHANGED
@@ -2,6 +2,14 @@ FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
 
 
 
 
 
 
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
@@ -18,4 +26,4 @@ EXPOSE 8501
18
 
19
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
20
 
21
- ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # 1) Create a writable HF cache dir under /app/.cache
6
+ RUN mkdir -p /app/.cache/huggingface/transformers \
7
+ && chmod -R 777 /app/.cache
8
+
9
+ # 2) Point the HF and Transformers caches there
10
+ ENV HF_HOME=/app/.cache/huggingface
11
+ ENV TRANSFORMERS_CACHE=/app/.cache/huggingface/transformers
12
+
13
  RUN apt-get update && apt-get install -y \
14
  build-essential \
15
  curl \
 
26
 
27
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
28
 
29
+ ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]