ankban commited on
Commit
e28dc9a
·
verified ·
1 Parent(s): e15fad8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -3
Dockerfile CHANGED
@@ -5,11 +5,15 @@ RUN apt update && \
5
  apt clean
6
 
7
  # Set Hugging Face and model cache dirs to a writable location
8
- ENV HF_HOME=/tmp/.cache/huggingface
9
- ENV TRANSFORMERS_CACHE=/tmp/.cache/huggingface
10
- ENV XDG_CACHE_HOME=/tmp/.cache
11
  ENV MPLCONFIGDIR=/tmp/matplotlib
12
 
 
 
 
 
13
  WORKDIR /app
14
  COPY requirements.txt .
15
  RUN pip install --no-cache-dir -r requirements.txt
 
5
  apt clean
6
 
7
  # Set Hugging Face and model cache dirs to a writable location
8
+ ENV HF_HOME=/data/hf
9
+ ENV TRANSFORMERS_CACHE=/data/hf
10
+ ENV XDG_CACHE_HOME=/data/hf
11
  ENV MPLCONFIGDIR=/tmp/matplotlib
12
 
13
+ RUN mkdir -p /data/hf && chmod -R 777 /data/hf
14
+
15
+ RUN python3 -c "from faster_whisper import WhisperModel; WhisperModel('base', compute_type='int8')"
16
+
17
  WORKDIR /app
18
  COPY requirements.txt .
19
  RUN pip install --no-cache-dir -r requirements.txt