p-doom/crowd-code-dataset-0.2 huggingface dataset:
[content] build_uv.sh (shellscript)
+# Core CUDA 12.9.1 Toolkit (Runtime, NVCC, CUPTI, NVRTC, CCCL)
+uv pip install "cuda-toolkit==12.9.1"
+
+# Libraries (cuDNN, NCCL, NVTX)
+uv pip install nvidia-cudnn-cu12 nvidia-nccl-cu12 nvidia-nvtx-cu12
[content] build_uv.sh (shellscript)
# Core CUDA 12.9.1 Toolkit (Runtime, NVCC, CUPTI, NVRTC, CCCL)
uv pip install "cuda-toolkit==12.9.1"

# Libraries (cuDNN, NCCL, NVTX)
uv pip install nvidia-cudnn-cu12 nvidia-nccl-cu12 nvidia-nvtx-cu12
[content] build_uv.sh (shellscript)
# =============================================================================
# Create a Unified CUDA Home (The "Symlink Farm")
# =============================================================================
# PyTorch extensions (like TransformerEngine) expect a standard CUDA layout 
# (include/ and lib/ in one place). PyPI splits them. We must merge them.
# =============================================================================

SITE_PACKAGES=$(python -c "import site; print(site.getsitepackages()[0])")
NVIDIA_PATH="$SITE_PACKAGES/nvidia"
export CUDA_HOME="$BASE_DIR/miles-venv/cuda_home"

echo "Creating unified CUDA_HOME at $CUDA_HOME..."
mkdir -p "$CUDA_HOME/include" "$CUDA_HOME/lib" "$CUDA_HOME/bin"

# Helper function to symlink contents
link_contents() {
    src="$1"
    dst="$2"
    if [ -d "$src" ]; then
        for f in "$src"/*; do
            ln -sf "$f" "$dst/"
        done
    fi
}

# Iterate over installed nvidia packages and link them into CUDA_HOME
# Note: We include cudnn and nccl here so they are found automatically too
for pkg in cuda_nvcc cuda_runtime cuda_cupti cuda_nvrtc cuda_cccl cudnn nccl; do
    link_contents "$NVIDIA_PATH/$pkg/include" "$CUDA_HOME/include"
    link_contents "$NVIDIA_PATH/$pkg/lib"     "$CUDA_HOME/lib"
    link_contents "$NVIDIA_PATH/$pkg/bin"     "$CUDA_HOME/bin"
done

# =============================================================================
# Export Paths based on the new Unified Home
# =============================================================================
export PATH="$CUDA_HOME/bin:$PATH"
export LD_LIBRARY_PATH="$CUDA_HOME/lib:$LD_LIBRARY_PATH"
export CPATH="$CUDA_HOME/include:$CPATH"
export LIBRARY_PATH="$CUDA_HOME/lib:$LIBRARY_PATH" 

# Verify it works
ls -l "$CUDA_HOME/include/cuda_runtime_api.h" || echo "WARNING: cuda_runtime_api.h not found!"