Quartz4065 commited on
Commit
bcedbf0
·
verified ·
1 Parent(s): 5f17246

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -1
Dockerfile CHANGED
@@ -9,8 +9,13 @@ RUN pip install --no-cache-dir -r requirements.txt
9
  RUN apt-get update && apt-get install -y --no-install-recommends \
10
  ffmpeg libsndfile1 && rm -rf /var/lib/apt/lists/*
11
 
 
 
 
 
 
 
12
  COPY app.py .
13
 
14
- # Spaces expects the app on 7860
15
  ENV PORT=7860
16
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
9
  RUN apt-get update && apt-get install -y --no-install-recommends \
10
  ffmpeg libsndfile1 && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Ensure model caches are writable inside Spaces
13
+ ENV HF_HOME=/tmp/hf
14
+ ENV HUGGINGFACE_HUB_CACHE=/tmp/hf
15
+ ENV XDG_CACHE_HOME=/tmp/.cache
16
+ RUN mkdir -p /tmp/hf /tmp/.cache
17
+
18
  COPY app.py .
19
 
 
20
  ENV PORT=7860
21
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]