JulianPhillips commited on
Commit
6dfa028
·
verified ·
1 Parent(s): a97e685

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -30,8 +30,9 @@ RUN pip install --no-cache-dir \
30
  opencv-python
31
 
32
  # Set Hugging Face cache to a guaranteed writable directory
33
- ENV TRANSFORMERS_CACHE=/tmp/cache
34
- RUN mkdir -p /tmp/cache && chmod -R 777 /tmp/cache
 
35
 
36
  # Create directories for the models
37
  RUN mkdir -p /models/blip /models/clip
@@ -60,4 +61,4 @@ COPY app.py /app/app.py
60
  EXPOSE 7860
61
 
62
  # Run the Flask app
63
- CMD ["python", "/app/app.py"]
 
30
  opencv-python
31
 
32
  # Set Hugging Face cache to a guaranteed writable directory
33
+ ENV TRANSFORMERS_CACHE=/app/cache
34
+ ENV HF_HOME=/app/cache
35
+ RUN mkdir -p /app/cache && chmod -R 777 /app/cache
36
 
37
  # Create directories for the models
38
  RUN mkdir -p /models/blip /models/clip
 
61
  EXPOSE 7860
62
 
63
  # Run the Flask app
64
+ CMD ["python", "/app/app.py"]