Hermes Agent v0.11on Hugging Face Spaces

部署步骤

部署到 Hugging Face Spaces

 

方式一:通过 Web 界面部署

 

  1. 创建 Space: 访问 https://huggingface.co/new-space

    • 选择 "Docker" SDK
    • 设置 Space 名称
    • 选择硬件配置(免费版即可开始)
  2. 克隆 Space 仓库:

git clone https://huggingface.co/spaces/tianzijian/HermesFace
cd YOUR_SPACE_NAME
提交更新:
git add .
git commit -m "Initial deployment"
  1. 复制项目文件:
# 复制所有项目文件到 Space 目录
cp -r /path/to/hermes-spaces/* .
  1. 配置环境变量:

    • 在 Space Settings → Variables 中设置:
      • HF_DATASET_REPOyour-username/hermes-data
      • HF_TOKENyour-huggingface-token
  2. 提交并推送:

hf auth login
hf upload tianzijian/HermesFace . --repo-type space --commit-message "Initial upload"
  1. 等待部署完成:
    • 访问 https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME
    • 查看 Build 日志,等待部署完成

方式二:通过 GitHub Actions 自动部署

 

  1. Fork 本仓库 到你的 GitHub 账号

  2. 在 Hugging Face 创建 Space:

  3. 配置 GitHub Secrets:

    • 进入 GitHub 仓库 → Settings → Secrets and variables → Actions
    • 添加以下 secrets:
      • HF_TOKEN: 你的 Hugging Face access token
      • HF_SPACE_REPOYOUR_USERNAME/YOUR_SPACE_NAME
  4. 推送代码到 main 分支:

git push origin main
  1. GitHub Actions 会自动部署:
    • 查看 Actions 标签页查看部署进度
    • 部署完成后访问 Space URL

相关推荐

暂无评论

发表评论