J1900 安装 Hermes Agent 指南
J1900 安装 Hermes Agent 指南
环境
- 设备: J1900 + 8G RAM
- 系统: Ubuntu 22.04 LTS
- 模式: 云端 API(不跑本地模型)
一、安装依赖
python3 --version
sudo apt install -y python3-pip python3-venv
二、安装 Hermes Agent
python3 -m venv ~/hermes-env
source ~/hermes-env/bin/activate
pip install hermes-agent
三、配置 API Key
export HERMES_API_KEY=你的API密钥
export HERMES_API_BASE=https://api.xxx.com # 你的 API 地址
写入配置文件 ~/.hermes/config.yml:
model:
provider: openai
api_key: 你的API密钥
api_base: https://api.xxx.com
model: hermes-3-llama-3.2-1b
server:
host: 0.0.0.0
port: 8081
四、启动
source ~/hermes-env/bin/activate
hermes serve
访问:http://工控机IP:8081
五、开机自启(可选)
sudo tee /etc/systemd/system/hermes.service << 'EOF'
[Unit]
Description=Hermes Agent
After=network.target
[Service]
Type=simple
User=simplejiufu
ExecStart=/home/simplejiufu/hermes-env/bin/hermes serve
WorkingDirectory=/home/simplejiufu
Restart=always
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable hermes
sudo systemctl start hermes
📝 本文由AI生成