mirror of
https://github.com/community-unscripted/ProxmoxVED.git
synced 2026-07-01 20:24:00 -04:00
updated install for offical ref
This commit is contained in:
+33
-28
@@ -33,35 +33,40 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "hermes-agent" "NousResearch/hermes-agent"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop hermes-agent
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Backing up Configuration"
|
||||
cp -r /root/.hermes /opt/hermes_backup 2>/dev/null || true
|
||||
cp /opt/hermes-agent/.env /opt/hermes_env.bak 2>/dev/null || true
|
||||
msg_ok "Backed up Configuration"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "hermes-agent" "NousResearch/hermes-agent" "tarball"
|
||||
|
||||
msg_info "Installing Python Dependencies"
|
||||
cd /opt/hermes-agent
|
||||
$STD uv venv .venv --python 3.12
|
||||
$STD uv pip install -e ".[all]"
|
||||
msg_ok "Installed Python Dependencies"
|
||||
|
||||
msg_info "Restoring Configuration"
|
||||
cp -r /opt/hermes_backup/. /root/.hermes 2>/dev/null || true
|
||||
cp /opt/hermes_env.bak /opt/hermes-agent/.env 2>/dev/null || true
|
||||
rm -rf /opt/hermes_backup /opt/hermes_env.bak
|
||||
msg_ok "Restored Configuration"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start hermes-agent
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
# Check if hermes command is available
|
||||
if [[ ! -x /opt/hermes-agent/.venv/bin/hermes ]]; then
|
||||
msg_error "Hermes executable not found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop hermes-agent
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Backing up Configuration"
|
||||
cp -r /root/.hermes /opt/hermes_backup 2>/dev/null || true
|
||||
cp /root/.hermes/.env /opt/hermes_env.bak 2>/dev/null || true
|
||||
msg_ok "Backed up Configuration"
|
||||
|
||||
msg_info "Updating Hermes Agent (using hermes update)"
|
||||
cd /opt/hermes-agent
|
||||
export VIRTUAL_ENV="/opt/hermes-agent/.venv"
|
||||
|
||||
# Run hermes update which handles git pull and dependency updates
|
||||
$STD /opt/hermes-agent/.venv/bin/hermes update
|
||||
msg_ok "Updated Hermes Agent"
|
||||
|
||||
msg_info "Restoring Configuration"
|
||||
cp -r /opt/hermes_backup/. /root/.hermes 2>/dev/null || true
|
||||
cp /opt/hermes_env.bak /root/.hermes/.env 2>/dev/null || true
|
||||
rm -rf /opt/hermes_backup /opt/hermes_env.bak
|
||||
msg_ok "Restored Configuration"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start hermes-agent
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
@@ -16,26 +16,44 @@ update_os
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
git \
|
||||
build-essential
|
||||
build-essential \
|
||||
python3-dev \
|
||||
libffi-dev \
|
||||
ripgrep \
|
||||
ffmpeg
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
PYTHON_VERSION="3.11" setup_uv
|
||||
|
||||
fetch_and_deploy_gh_release "hermes-agent" "NousResearch/hermes-agent" "tarball"
|
||||
msg_info "Cloning Hermes Agent Repository"
|
||||
cd /opt
|
||||
$STD git clone --recurse-submodules https://github.com/NousResearch/hermes-agent.git hermes-agent
|
||||
cd /opt/hermes-agent
|
||||
msg_ok "Cloned Repository"
|
||||
|
||||
msg_info "Installing Python Dependencies"
|
||||
cd /opt/hermes-agent
|
||||
$STD uv venv .venv --python 3.12
|
||||
$STD uv venv .venv --python 3.11
|
||||
export VIRTUAL_ENV="/opt/hermes-agent/.venv"
|
||||
$STD uv pip install -e ".[all]"
|
||||
|
||||
msg_info "Installing Submodules"
|
||||
if [ -d "mini-swe-agent" ] && [ -f "mini-swe-agent/pyproject.toml" ]; then
|
||||
$STD uv pip install -e "./mini-swe-agent"
|
||||
fi
|
||||
if [ -d "tinker-atropos" ] && [ -f "tinker-atropos/pyproject.toml" ]; then
|
||||
$STD uv pip install -e "./tinker-atropos"
|
||||
fi
|
||||
msg_ok "Installed Python Dependencies"
|
||||
|
||||
msg_info "Creating Configuration Directory"
|
||||
mkdir -p /root/.hermes
|
||||
mkdir -p /opt/hermes-agent/data
|
||||
mkdir -p /root/.hermes/{cron,sessions,logs,pairing,hooks,image_cache,audio_cache,memories,skills,whatsapp/session}
|
||||
msg_ok "Created Configuration Directory"
|
||||
|
||||
msg_info "Creating Environment File"
|
||||
cat <<EOF >/opt/hermes-agent/.env
|
||||
if [ -f "/opt/hermes-agent/.env.example" ]; then
|
||||
cp /opt/hermes-agent/.env.example /root/.hermes/.env
|
||||
else
|
||||
cat <<EOF >/root/.hermes/.env
|
||||
# Hermes Agent Configuration
|
||||
# Add your LLM provider API keys below
|
||||
|
||||
@@ -52,8 +70,68 @@ cat <<EOF >/opt/hermes-agent/.env
|
||||
HERMES_HOST=0.0.0.0
|
||||
HERMES_PORT=8000
|
||||
EOF
|
||||
fi
|
||||
msg_ok "Created Environment File"
|
||||
|
||||
msg_info "Creating Config File"
|
||||
if [ -f "/opt/hermes-agent/cli-config.yaml.example" ]; then
|
||||
cp /opt/hermes-agent/cli-config.yaml.example /root/.hermes/config.yaml
|
||||
fi
|
||||
msg_ok "Created Config File"
|
||||
|
||||
msg_info "Creating SOUL.md Persona File"
|
||||
cat <<'EOF' >/root/.hermes/SOUL.md
|
||||
# Hermes Agent Persona
|
||||
|
||||
<!--
|
||||
This file defines the agent's personality and tone.
|
||||
The agent will embody whatever you write here.
|
||||
Edit this to customize how Hermes communicates with you.
|
||||
|
||||
Examples:
|
||||
- "You are a warm, playful assistant who uses kaomoji occasionally."
|
||||
- "You are a concise technical expert. No fluff, just facts."
|
||||
- "You speak like a friendly coworker who happens to know everything."
|
||||
|
||||
This file is loaded fresh each message -- no restart needed.
|
||||
Delete the contents (or this file) to use the default personality.
|
||||
-->
|
||||
EOF
|
||||
msg_ok "Created SOUL.md"
|
||||
|
||||
msg_info "Creating Symlink for Hermes Command"
|
||||
mkdir -p /root/.local/bin
|
||||
ln -sf /opt/hermes-agent/.venv/bin/hermes /root/.local/bin/hermes
|
||||
msg_ok "Created Symlink"
|
||||
|
||||
msg_info "Syncing Bundled Skills"
|
||||
if [ -d "/opt/hermes-agent/skills" ]; then
|
||||
$STD /opt/hermes-agent/.venv/bin/python /opt/hermes-agent/tools/skills_sync.py 2>/dev/null || \
|
||||
cp -r /opt/hermes-agent/skills/* /root/.hermes/skills/ 2>/dev/null || true
|
||||
fi
|
||||
msg_ok "Synced Skills"
|
||||
|
||||
msg_info "Installing Node.js Dependencies (for browser tools)"
|
||||
if command -v node &> /dev/null; then
|
||||
HAS_NODE=true
|
||||
else
|
||||
$STD apt install -y nodejs npm
|
||||
HAS_NODE=true
|
||||
fi
|
||||
|
||||
if [ "$HAS_NODE" = true ] && [ -f "/opt/hermes-agent/package.json" ]; then
|
||||
cd /opt/hermes-agent
|
||||
$STD npm install --silent 2>/dev/null || true
|
||||
msg_info "Installing Playwright Browser"
|
||||
$STD npx playwright install chromium 2>/dev/null || true
|
||||
fi
|
||||
|
||||
if [ -f "/opt/hermes-agent/scripts/whatsapp-bridge/package.json" ]; then
|
||||
cd /opt/hermes-agent/scripts/whatsapp-bridge
|
||||
$STD npm install --silent 2>/dev/null || true
|
||||
fi
|
||||
msg_ok "Installed Node.js Dependencies"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/hermes-agent.service
|
||||
[Unit]
|
||||
@@ -64,7 +142,8 @@ After=network.target
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/hermes-agent
|
||||
EnvironmentFile=/opt/hermes-agent/.env
|
||||
Environment="PATH=/root/.local/bin:/usr/local/bin:/usr/bin:/bin"
|
||||
EnvironmentFile=/root/.hermes/.env
|
||||
ExecStart=/opt/hermes-agent/.venv/bin/hermes gateway
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
Reference in New Issue
Block a user