Spaces:
Running on Zero
Running on Zero
Read the kernel cache with FASTH3_KERNEL_CACHE_TOKEN when set
Browse filesThe org Space's HF_TOKEN cannot read the private multimodalart cache repo.
- fasth3_engine.py +2 -1
fasth3_engine.py
CHANGED
|
@@ -57,7 +57,8 @@ def fetch_kernel_cache() -> bool:
|
|
| 57 |
|
| 58 |
t0 = time.time()
|
| 59 |
try:
|
| 60 |
-
|
|
|
|
| 61 |
with tarfile.open(archive) as tar:
|
| 62 |
tar.extractall(KERNEL_CACHE_DIR, filter="tar")
|
| 63 |
except Exception as error:
|
|
|
|
| 57 |
|
| 58 |
t0 = time.time()
|
| 59 |
try:
|
| 60 |
+
token = os.getenv("FASTH3_KERNEL_CACHE_TOKEN") or _hf_token()
|
| 61 |
+
archive = hf_hub_download(KERNEL_CACHE_REPO, kernel_cache_name(), repo_type="dataset", token=token)
|
| 62 |
with tarfile.open(archive) as tar:
|
| 63 |
tar.extractall(KERNEL_CACHE_DIR, filter="tar")
|
| 64 |
except Exception as error:
|