Martí Umbert commited on
Commit
bc8b408
·
1 Parent(s): 5153d05

Dockefile: add env variables with quotes

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -5
Dockerfile CHANGED
@@ -9,11 +9,19 @@ 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 && \
15
- # apt-get clean && \
16
- # rm -rf /var/lib/apt/lists/*
17
 
18
  # 2) Install system dependencies + Python + pip
19
  RUN apt-get update && \
@@ -47,7 +55,7 @@ RUN if [ -n "$EXTRAS" ]; then \
47
  # Note: This only persists for a single, named container. This is
48
  # only for convenience at de/test stage.
49
  # For prod, it is better to use a named volume via host mount/k8s.
50
- VOLUME ["/root/.cache/huggingface/hub"]
51
 
52
  # or
53
  # B) Conditionally copy a local pre-cache from the build context to the
 
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 && \
23
+ apt-get clean && \
24
+ rm -rf /var/lib/apt/lists/*
25
 
26
  # 2) Install system dependencies + Python + pip
27
  RUN apt-get update && \
 
55
  # Note: This only persists for a single, named container. This is
56
  # only for convenience at de/test stage.
57
  # For prod, it is better to use a named volume via host mount/k8s.
58
+ # VOLUME ["/root/.cache/huggingface/hub"]
59
 
60
  # or
61
  # B) Conditionally copy a local pre-cache from the build context to the