Skip to content
Open
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
35 changes: 35 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,38 @@ setup_s3_mount() {
fi
}

setup_build_venv() {
if prompt_yes_no "Create local virtual environment for build dependencies?" "y"; then
info "Setting up virtual environment..."

if check_command uv; then
info "Using uv for fast setup..."
if uv venv .venv && uv pip install e2b; then
success "Virtual environment created with uv"
else
warning "Failed to create venv with uv, falling back to standard venv"
if python3 -m venv .venv && .venv/bin/pip install e2b; then
success "Virtual environment created"
else
error "Failed to create venv"
return 1
fi
fi
else
info "Using standard python venv..."
if python3 -m venv .venv && .venv/bin/pip install e2b; then
success "Virtual environment created"
else
error "Failed to create venv"
return 1
fi
fi

info "Activating virtual environment..."
source .venv/bin/activate
fi
}

build_e2b_template() {
step "Building E2B v2 Template (Optional)"

Expand Down Expand Up @@ -1109,6 +1141,9 @@ build_e2b_template() {
info "E2B API key loaded, building dev template..."
cd "$e2b_dir"

# Setup virtual environment if requested
setup_build_venv

# E2B v2 approach: Use Python SDK with environment variables
info "Building template using E2B v2 Python SDK..."
info "Template features: Runtime S3 mounting, parallel initialization"
Expand Down