modified: install.sh

This commit is contained in:
Axiaobo 2025-10-29 03:41:01 +00:00
parent 11aa78bd9b
commit 651ce13ef6

View File

@ -31,10 +31,23 @@ on_error() {
exit "$code" 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() { run_conda_quiet() {
local output local output
output=$(conda install --yes --quiet -c conda-forge "$@" 2>&1) || { output=$("$CONDA_CMD" install --yes --quiet -c conda-forge "$@" 2>&1) || {
echo -e "${ERROR} Conda install failed:\n$output" echo -e "${ERROR} ${CONDA_CMD} install failed:\n$output"
exit 1 exit 1
} }
} }
@ -56,11 +69,6 @@ run_wget_quiet() {
fi fi
} }
if ! command -v conda &>/dev/null; then
echo -e "${ERROR}Conda Not Found"
exit 1
fi
USE_CUDA=false USE_CUDA=false
USE_ROCM=false USE_ROCM=false
USE_CPU=false USE_CPU=false