mirror of
https://github.com/NVIDIA/TensorRT-LLM.git
synced 2026-01-14 06:27:45 +08:00
* TensorRT-LLM Release 0.10.0 --------- Co-authored-by: Loki <lokravi@amazon.com> Co-authored-by: meghagarwal <16129366+megha95@users.noreply.github.com>
20 lines
555 B
Python
20 lines
555 B
Python
import os
|
|
from pathlib import Path
|
|
from typing import Optional
|
|
|
|
|
|
def llm_models_root(check=False) -> Optional[Path]:
|
|
root = Path("/home/scratch.trt_llm_data/llm-models/")
|
|
|
|
if "LLM_MODELS_ROOT" in os.environ:
|
|
root = Path(os.environ.get("LLM_MODELS_ROOT"))
|
|
|
|
if not root.exists():
|
|
root = Path("/scratch.trt_llm_data/llm-models/")
|
|
|
|
if check:
|
|
assert root.exists(), \
|
|
"You shall set LLM_MODELS_ROOT env or be able to access /home/scratch.trt_llm_data to run this test"
|
|
|
|
return root if root.exists() else None
|