bear-ty commited on
Commit
d90fdab
·
verified ·
1 Parent(s): e55193c

Materialize private runtime directory for subprocesses

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -22,13 +22,14 @@ if not PRIVATE_REPO_TOKEN:
22
  "PRIVATE_REPO_TOKEN is not configured. Add it as a Hugging Face Space secret."
23
  )
24
 
25
- RUNTIME_ROOT = Path(
26
- snapshot_download(
27
- repo_id=PRIVATE_REPO_ID,
28
- repo_type="model",
29
- token=PRIVATE_REPO_TOKEN,
30
- )
31
- ).resolve()
 
32
 
33
  required_files = [
34
  RUNTIME_ROOT / "runtime_app.py",
 
22
  "PRIVATE_REPO_TOKEN is not configured. Add it as a Hugging Face Space secret."
23
  )
24
 
25
+ RUNTIME_ROOT = Path("/tmp/beyondretarget_runtime")
26
+ snapshot_download(
27
+ repo_id=PRIVATE_REPO_ID,
28
+ repo_type="model",
29
+ token=PRIVATE_REPO_TOKEN,
30
+ local_dir=str(RUNTIME_ROOT),
31
+ )
32
+ RUNTIME_ROOT = RUNTIME_ROOT.resolve()
33
 
34
  required_files = [
35
  RUNTIME_ROOT / "runtime_app.py",