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:
A 2026-02-10 15:25:28 -08:00 committed by GitHub
parent 70cca1a0ae
commit 04cb12fa4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 60 additions and 1 deletions

59
fluidstack/interpreter.sh Normal file
View 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"

View file

@ -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",