StatusReport commited on
Commit
44f32cf
·
verified ·
1 Parent(s): e0eebf9

App: place caches in persistent storage

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -6,6 +6,11 @@ import sys
6
  os.environ["TORCH_COMPILE_DISABLE"] = "1"
7
  os.environ["TORCHDYNAMO_DISABLE"] = "1"
8
 
 
 
 
 
 
9
  # Install xformers for memory-efficient attention
10
  subprocess.run([sys.executable, "-m", "pip", "install", "xformers==0.0.32.post2", "--no-build-isolation"], check=False)
11
 
 
6
  os.environ["TORCH_COMPILE_DISABLE"] = "1"
7
  os.environ["TORCHDYNAMO_DISABLE"] = "1"
8
 
9
+ # Place caches in persistent storage
10
+ os.environ["HF_HOME"] = /data/.huggingface
11
+ os.environ["HF_HUB_CACHE"] = /data/.cache/huggingface/hub
12
+ os.environ["HF_DATASETS_CACHE"] = /data/.cache/huggingface/datasets
13
+
14
  # Install xformers for memory-efficient attention
15
  subprocess.run([sys.executable, "-m", "pip", "install", "xformers==0.0.32.post2", "--no-build-isolation"], check=False)
16