fangjiang commited on
Commit
f9f3ea6
·
1 Parent(s): 777dfbf

add clean up command and storage track

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -17,8 +17,12 @@ from cytof.utils import show_color_table
17
 
18
  # clean up accumulated tmp files
19
  import shutil
20
- shutil.rmtree("/home/user/.cache/huggingface", ignore_errors=True)
21
- shutil.rmtree("/home/user/.cache/torch", ignore_errors=True)
 
 
 
 
22
 
23
  OUTDIR = './output'
24
 
 
17
 
18
  # clean up accumulated tmp files
19
  import shutil
20
+ shutil.rmtree("/home/user/.cache", ignore_errors=True)
21
+
22
+ # prevent future cache growth
23
+ os.environ["HF_HOME"] = "/tmp/huggingface"
24
+ os.environ["TRANSFORMERS_CACHE"] = "/tmp/transformers"
25
+ os.environ["TORCH_HOME"] = "/tmp/torch"
26
 
27
  OUTDIR = './output'
28