Spaces:
Sleeping
Sleeping
fangjiang
commited on
Commit
·
f9f3ea6
1
Parent(s):
777dfbf
add clean up command and storage track
Browse files
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
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|