Merge 651ce13ef6e1bef1d468541305a3d7d0db5fb50d into 9ec3a60f30d228719e5ec6cd6796c5b2d888dd1a

This commit is contained in:
Axiaobo 2025-12-01 20:43:20 +08:00 committed by GitHub
commit cc6fd108af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,10 +31,23 @@ on_error() {
exit "$code"
}
# Detect conda or micromamba
CONDA_CMD=""
if command -v micromamba &>/dev/null; then
CONDA_CMD="micromamba"
echo -e "${INFO}Detected micromamba"
elif command -v conda &>/dev/null; then
CONDA_CMD="conda"
echo -e "${INFO}Detected conda"
else
echo -e "${ERROR}Neither conda nor micromamba found"
exit 1
fi
run_conda_quiet() {
local output
output=$(conda install --yes --quiet -c conda-forge "$@" 2>&1) || {
echo -e "${ERROR} Conda install failed:\n$output"
output=$("$CONDA_CMD" install --yes --quiet -c conda-forge "$@" 2>&1) || {
echo -e "${ERROR} ${CONDA_CMD} install failed:\n$output"
exit 1
}
}
@ -56,11 +69,6 @@ run_wget_quiet() {
fi
}
if ! command -v conda &>/dev/null; then
echo -e "${ERROR}Conda Not Found"
exit 1
fi
USE_CUDA=false
USE_ROCM=false
USE_CPU=false