careless: build venv with uv instead of conda (anaconda.com blocked on Ra)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+6
-11
@@ -5,12 +5,11 @@ pbuild::prep() {
|
||||
}
|
||||
|
||||
pbuild::configure() {
|
||||
# careless is pip-installed, but upstream recommends a fresh conda env
|
||||
# (TensorFlow dependency conflicts), so install a private miniconda in PREFIX
|
||||
mkdir -p "$PREFIX/miniconda"
|
||||
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O "$PREFIX/miniconda/miniconda.sh"
|
||||
bash "$PREFIX/miniconda/miniconda.sh" -b -u -p "$PREFIX/miniconda/"
|
||||
"$PREFIX/miniconda/condabin/conda" create -y -n "careless_$V" python=3.12
|
||||
# repo.anaconda.com is unreachable from Ra (GnuTLS error), so no conda.
|
||||
# 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.
|
||||
export UV_PYTHON_INSTALL_DIR="$PREFIX/python"
|
||||
uv venv --python 3.12 "$PREFIX/venv"
|
||||
}
|
||||
|
||||
pbuild::compile() {
|
||||
@@ -18,10 +17,6 @@ pbuild::compile() {
|
||||
}
|
||||
|
||||
pbuild::install() {
|
||||
source "$PREFIX/miniconda/etc/profile.d/conda.sh"
|
||||
conda activate "careless_$V"
|
||||
pip install --upgrade pip
|
||||
# [cuda] extra ships the NVIDIA libs via pip wheels; works on CPU-only nodes too
|
||||
pip install --no-cache-dir "careless[cuda]==${V_PKG}"
|
||||
conda deactivate
|
||||
uv pip install --python "$PREFIX/venv/bin/python" "careless[cuda]==${V_PKG}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user