Skip to content

Commit

Permalink
use different model cache than default
Browse files Browse the repository at this point in the history
  • Loading branch information
wey-gu committed Jan 20, 2024
1 parent 231e152 commit 14feb12
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/nebulagraph_lite/nebulagraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,17 @@ def _try_download_modelscope(self):
try:
from modelscope.hub.file_download import model_file_download

# create cache folder
cache_path = f"{self.base_path}/cache"
os.makedirs(cache_path, exist_ok=True)
os.environ["MODELSCOPE_CACHE"] = cache_path

# download nebulagraph_lite image tarball
model_file = model_file_download(
model_id=MODELSCOPE_MODEL_ID,
file_path=MODELSCOPE_MODEL_FILE_PATH,
revision=MODELSCOPE_MODEL_VERSION,
target_path=self.base_path,
)
# download udocker tarball
tarball_file = model_file_download(
Expand Down

0 comments on commit 14feb12

Please sign in to comment.