okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
ad33b8074
main
1#!/usr/bin/env bash 2# SYCLomatic needs CUDA SDK headers to parse the sources (no GPU, no toolkit). The pip wheels carry them. 3set -euo pipefail 4out =${ 1 :- $ PWD /cuda-headers} # mount this at /cuda-headers in the dev image 5py =${ PYTHON :-python3} # needs pip 6mkdir -p " $ out /wheels" " $ out /include" 7$ py -m pip download-q --no-deps -d " $ out /wheels" \ 8 nvidia-cuda-runtime-cu12==12.8.90 nvidia-cuda-nvcc-cu12==12.8.93 nvidia-cublas-cu12==12.8.4.1 nvidia-cuda-cccl-cu12==12.8.90 nvidia-curand-cu12==10.3.9.90 9for w in " $ out " /wheels/*.whl;do 10$ py - " $ w " " $ out /include" <<'PY' 11import sys, zipfile, os 12w, dst = sys.argv[1], sys.argv[2] 13z = zipfile.ZipFile(w) 14n = 0 15for m in z.namelist(): 16if "/include/" in m and not m.endswith("/"): 17rel = m.split("/include/", 1)[1] 18p = os.path.join(dst, rel) 19os.makedirs(os.path.dirname(p), exist_ok=True) 20with open(p, "wb") as f: f.write(z.read(m)) 21n += 1 22print(os.path.basename(w), n, "headers") 23PY 24done 25ls " $ out /include" | head -50 26for h in cuda.h cuda_runtime.h cuda_runtime_api.h crt/host_defines.h cuda_fp16.h cuda_bf16.h cublas_v2.h;do 27 [ -f" $ out /include/ $ h " ]&& echo "ok $ h " ||echo "MISS $ h " ;done 28grep -m1 CUDA_VERSION" $ out /include/cuda.h" ||true