KingHacker9000 commited on
Commit
3afecba
·
1 Parent(s): 149e0d8

switch setup-10

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -0
Dockerfile CHANGED
@@ -27,6 +27,16 @@ RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 2
27
  RUN python3 -m pip install --upgrade pip && \
28
  python3 -m pip install \
29
  torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
 
 
 
 
 
 
 
 
 
 
30
 
31
  RUN \
32
  # Clone diffvg recursively so we get the thrust submodule too
 
27
  RUN python3 -m pip install --upgrade pip && \
28
  python3 -m pip install \
29
  torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
30
+
31
+ # 1. Create a writeable cache directory
32
+ RUN mkdir -p /tmp/hf_cache/hub
33
+
34
+ # 2. Grant permissions so any user in the container can write there
35
+ RUN chmod -R a+rwX /tmp/hf_cache
36
+
37
+ # 3. Point Hugging Face Hub to that cache
38
+ ENV HF_HOME=/tmp/hf_cache \
39
+ HF_HUB_CACHE=/tmp/hf_cache/hub
40
 
41
  RUN \
42
  # Clone diffvg recursively so we get the thrust submodule too