mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-06 16:31:08 +00:00
feat: Add interpreter on FluidStack (#275)
Agent: gap-filler Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
70cca1a0ae
commit
04cb12fa4a
2 changed files with 60 additions and 1 deletions
59
fluidstack/interpreter.sh
Normal file
59
fluidstack/interpreter.sh
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
#!/bin/bash
|
||||
# shellcheck disable=SC2154
|
||||
set -eo pipefail
|
||||
|
||||
# Source common functions - try local file first, fall back to remote
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
|
||||
# shellcheck source=fluidstack/lib/common.sh
|
||||
if [[ -f "${SCRIPT_DIR}/lib/common.sh" ]]; then
|
||||
source "${SCRIPT_DIR}/lib/common.sh"
|
||||
else
|
||||
eval "$(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/fluidstack/lib/common.sh)"
|
||||
fi
|
||||
|
||||
log_info "Open Interpreter on FluidStack"
|
||||
echo ""
|
||||
|
||||
# 1. Ensure FluidStack API key is configured
|
||||
ensure_fluidstack_token
|
||||
|
||||
# 2. Generate + register SSH key
|
||||
ensure_ssh_key
|
||||
|
||||
# 3. Get instance name and create instance
|
||||
SERVER_NAME=$(get_server_name)
|
||||
create_server "${SERVER_NAME}"
|
||||
|
||||
# 4. Wait for SSH connectivity and install base tools
|
||||
verify_server_connectivity
|
||||
install_base_tools
|
||||
|
||||
# 5. Install Open Interpreter
|
||||
log_warn "Installing Open Interpreter..."
|
||||
run_server "${FLUIDSTACK_SERVER_IP}" "pip install open-interpreter 2>/dev/null || pip3 install open-interpreter"
|
||||
|
||||
# 6. Get OpenRouter API key
|
||||
echo ""
|
||||
if [[ -n "${OPENROUTER_API_KEY:-}" ]]; then
|
||||
log_info "Using OpenRouter API key from environment"
|
||||
else
|
||||
OPENROUTER_API_KEY=$(get_openrouter_api_key_oauth 5180)
|
||||
fi
|
||||
|
||||
# 7. Inject environment variables
|
||||
log_warn "Setting up environment variables..."
|
||||
inject_env_vars_ssh "${FLUIDSTACK_SERVER_IP}" upload_file run_server \
|
||||
"OPENROUTER_API_KEY=${OPENROUTER_API_KEY}" \
|
||||
"OPENAI_API_KEY=${OPENROUTER_API_KEY}" \
|
||||
"OPENAI_BASE_URL=https://openrouter.ai/api/v1"
|
||||
|
||||
echo ""
|
||||
log_info "FluidStack instance setup completed successfully!"
|
||||
log_info "Instance: ${SERVER_NAME} (IP: ${FLUIDSTACK_SERVER_IP})"
|
||||
echo ""
|
||||
|
||||
# 8. Start Open Interpreter interactively
|
||||
log_warn "Starting Open Interpreter..."
|
||||
sleep 1
|
||||
clear
|
||||
interactive_session "${FLUIDSTACK_SERVER_IP}" "source ~/.zshrc && interpreter"
|
||||
|
|
@ -820,7 +820,7 @@
|
|||
"fluidstack/aider": "implemented",
|
||||
"fluidstack/goose": "implemented",
|
||||
"fluidstack/codex": "implemented",
|
||||
"fluidstack/interpreter": "missing",
|
||||
"fluidstack/interpreter": "implemented",
|
||||
"fluidstack/gemini": "missing",
|
||||
"fluidstack/amazonq": "missing",
|
||||
"fluidstack/cline": "missing",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue