Revert "Drop careless-gpu: the [cuda] pip extra install covers GPU and CPU nodes"

This reverts commit 5f25c83085.
This commit is contained in:
duan_j committed 2026-08-18 11:14:13 +02:00
1 parent 5f25c83085
commit 38ca2271f0
7 files changed
+98 -12

No files matched your search

+5 -5
View File
@@ -9,8 +9,9 @@ pbuild::configure() {
# uv fetches a standalone CPython instead; keep it inside PREFIX so the
# venv's interpreter symlinks don't depend on the builder's home cache.
UV="${UV:-$HOME/.local/bin/uv}"
# ~/.cache/uv hits the home disk quota; default the cache into PREFIX
# (overridable: UV_CACHE_DIR=<path> modbuild build <version>)
# ~/.cache/uv hits the home disk quota; default the cache into PREFIX.
# Overridable so careless and careless-gpu can share one cache:
# UV_CACHE_DIR=<shared path> modbuild build <version>
export UV_CACHE_DIR="${UV_CACHE_DIR:-$PREFIX/.uv-cache}"
export UV_PYTHON_INSTALL_DIR="$PREFIX/python"
"$UV" venv --python 3.12 "$PREFIX/venv"
@@ -23,9 +24,8 @@ pbuild::compile() {
pbuild::install() {
UV="${UV:-$HOME/.local/bin/uv}"
export UV_CACHE_DIR="${UV_CACHE_DIR:-$PREFIX/.uv-cache}"
# [cuda] extra ships the NVIDIA stack (CUDA, cuDNN, ...) as pip wheels:
# uses the GPU when present (needs only the node driver), else falls back to CPU
"$UV" pip install --python "$PREFIX/venv/bin/python" "careless[cuda]==${V_PKG}"
# CPU version; the GPU build with the [cuda] extra is the careless-gpu module
"$UV" pip install --python "$PREFIX/venv/bin/python" "careless==${V_PKG}"
# only auto-remove the cache if it lives inside this PREFIX (never a shared one)
[[ "$UV_CACHE_DIR" == "$PREFIX"* ]] && rm -rf "$UV_CACHE_DIR" || :
}