LuaNovaV1 / scripts /env.ps1
oProfM's picture
Lua Nova V1 trained on oProfM/LuaNovaDataset: weights, ONNX, eval, code
d4101a0 verified
Raw History Blame Contribute Delete
1.06 kB
$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $PSScriptRoot
$repoRoot = Split-Path -Parent (Split-Path -Parent $root)
$env:UV_CACHE_DIR = Join-Path $repoRoot ".cache\uv"
Remove-Item Env:\HF_HOME -ErrorAction SilentlyContinue
$env:HF_HUB_CACHE = Join-Path $root "hf_cache"
$env:HUGGINGFACE_HUB_CACHE = $env:HF_HUB_CACHE
$env:HF_XET_CACHE = Join-Path $root "hf_cache\xet"
$env:HF_ASSETS_CACHE = Join-Path $root "hf_cache\assets"
$env:HF_MODULES_CACHE = Join-Path $root "hf_cache\modules"
$env:HF_DATASETS_CACHE = Join-Path $root "hf_cache\datasets"
$env:TORCH_HOME = Join-Path $root "torch_cache"
$env:TORCHINDUCTOR_CACHE_DIR = Join-Path $root "torch_cache"
$env:TRITON_CACHE_DIR = Join-Path $root "triton_cache"
$env:TMP = Join-Path $root "tmp"
$env:TEMP = Join-Path $root "tmp"
$env:PYTHONUTF8 = "1"
$env:PYTHONIOENCODING = "utf-8"
$env:PYTHONUNBUFFERED = "1"
foreach ($d in @($env:HF_HUB_CACHE, $env:HF_XET_CACHE, $env:TORCH_HOME, $env:TMP)) {
if (-not (Test-Path $d)) {
New-Item -ItemType Directory -Force -Path $d | Out-Null
}
}