Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions scripts/runtime/setup-llm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,20 @@ setup_llm() {
exit 1
fi

# Create virtual environment for LLM
log_info "Creating Python virtual environment for LLM..."
python3 -m venv "$llm_venv"
# Create virtual environment for LLM. Bootstrap pip as a separate step:
# `python3 -m venv` hides ensurepip's output, so a failure would only
# report "exit status 1" without the reason.
local python3_bin
python3_bin="$(command -v python3)"
log_info "Creating Python virtual environment for LLM (using $python3_bin)..."
if ! python3 -m venv --without-pip "$llm_venv"; then
log_error "Could not create the LLM virtual environment at $llm_venv."
exit 1
fi
if ! "$llm_venv/bin/python" -m ensurepip --upgrade --default-pip; then
log_error "Could not bootstrap pip into $llm_venv (python3: $python3_bin)."
exit 1
fi

# Install LLM in virtual environment
log_info "Installing LLM library..."
Expand Down
Loading