Spaces:
Running on Zero
Running on Zero
Materialize private runtime directory for subprocesses
Browse files
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 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
)
|
| 31 |
-
)
|
|
|
|
| 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",
|