Update Dockerfile
Browse files- 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=/
|
| 9 |
-
ENV TRANSFORMERS_CACHE=/
|
| 10 |
-
ENV XDG_CACHE_HOME=/
|
| 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
|