EladSpamson commited on
Commit
5faf489
·
verified ·
1 Parent(s): 67a7670

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -2
Dockerfile CHANGED
@@ -1,5 +1,6 @@
1
  FROM python:3.10-slim
2
 
 
3
  ENV HF_HOME=/tmp/hf_cache
4
  ENV TRANSFORMERS_CACHE=/tmp/hf_cache
5
  ENV HF_DATASETS_CACHE=/tmp/hf_cache
@@ -8,12 +9,13 @@ ENV XDG_CACHE_HOME=/tmp
8
  WORKDIR /app
9
  COPY . /app
10
 
11
- # Install apt packages to decode MP3, WAV, etc.
12
  RUN apt-get update && apt-get install -y ffmpeg libsndfile1 && rm -rf /var/lib/apt/lists/*
13
 
 
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
- # Increase Gunicorn timeout from default 30s to 5 minutes
17
  ENV GUNICORN_CMD_ARGS="--timeout 300 --workers=1"
18
 
19
  EXPOSE 7860
 
1
  FROM python:3.10-slim
2
 
3
+ # Environment variable overrides, so HF never attempts to write to /.cache
4
  ENV HF_HOME=/tmp/hf_cache
5
  ENV TRANSFORMERS_CACHE=/tmp/hf_cache
6
  ENV HF_DATASETS_CACHE=/tmp/hf_cache
 
9
  WORKDIR /app
10
  COPY . /app
11
 
12
+ # Install apt packages for audio decoding (WAV, MP3, FLAC, etc.)
13
  RUN apt-get update && apt-get install -y ffmpeg libsndfile1 && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Install Python dependencies
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
+ # Extend Gunicorn’s default 30s timeout 5 minutes
19
  ENV GUNICORN_CMD_ARGS="--timeout 300 --workers=1"
20
 
21
  EXPOSE 7860