Martí Umbert
commited on
Commit
·
f6a5927
1
Parent(s):
cbbb5da
Dockerfile: cache folders, etc
Browse files- Dockerfile +20 -0
Dockerfile
CHANGED
@@ -9,6 +9,14 @@ ARG EXTRAS
|
|
9 |
ARG HF_PRECACHE_DIR
|
10 |
ARG HF_TKN_FILE
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
# Install system dependencies
|
13 |
#RUN apt-get update && \
|
14 |
# apt-get install -y ffmpeg git && \
|
@@ -29,6 +37,18 @@ RUN pip install torch torchvision torchaudio --index-url https://download.pytorc
|
|
29 |
|
30 |
COPY . .
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
# Install WhisperLiveKit directly, allowing for optional dependencies
|
33 |
# Note: For gates modedls, need to add your HF toke. See README.md
|
34 |
# for more details.
|
|
|
9 |
ARG HF_PRECACHE_DIR
|
10 |
ARG HF_TKN_FILE
|
11 |
|
12 |
+
ENV HF_HOME="/app/tmp/cache/huggingface"
|
13 |
+
ENV HF_HUB_CACHE="/app/tmp/cache/huggingface/hub"
|
14 |
+
ENV XDG_CACHE_HOME="/app/tmp/cache/huggingface"
|
15 |
+
ENV LIBROSA_CACHE_DIR="/app/tmp/librosa_cache"
|
16 |
+
ENV NUMBA_CACHE_DIR="/app/tmp/numba_cache"
|
17 |
+
ENV HF_HUB_ETAG_TIMEOUT="600"
|
18 |
+
ENV HF_HUB_DOWNLOAD_TIMEOUT="600"
|
19 |
+
|
20 |
# Install system dependencies
|
21 |
#RUN apt-get update && \
|
22 |
# apt-get install -y ffmpeg git && \
|
|
|
37 |
|
38 |
COPY . .
|
39 |
|
40 |
+
RUN mkdir -p $HF_HOME && \
|
41 |
+
mkdir -p $HF_HUB_CACHE && \
|
42 |
+
mkdir -p $XDG_CACHE_HOME && \
|
43 |
+
mkdir -p $LIBROSA_CACHE_DIR && \
|
44 |
+
mkdir -p $NUMBA_CACHE_DIR && \
|
45 |
+
chmod 777 $HF_HOME && \
|
46 |
+
chmod 777 $HF_HUB_CACHE && \
|
47 |
+
chmod 777 $XDG_CACHE_HOME && \
|
48 |
+
chmod 777 $LIBROSA_CACHE_DIR && \
|
49 |
+
chmod 777 $NUMBA_CACHE_DIR && \
|
50 |
+
chmod -R 777 /app
|
51 |
+
|
52 |
# Install WhisperLiveKit directly, allowing for optional dependencies
|
53 |
# Note: For gates modedls, need to add your HF toke. See README.md
|
54 |
# for more details.
|