Text Generation
PEFT
Chinese
English
preference-learning
qlora
agent
personalization
association-engine
Instructions to use feiertu/hermes-association-engine with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use feiertu/hermes-association-engine with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +38 -0
Dockerfile
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Hermes 联想引擎 Docker 镜像
|
| 2 |
+
# 构建: docker build -t hermes .
|
| 3 |
+
# 运行: docker run -d -v hermes_data:/root/.hermes --name hermes hermes
|
| 4 |
+
|
| 5 |
+
FROM python:3.11-slim
|
| 6 |
+
|
| 7 |
+
LABEL org.opencontainers.image.title="Hermes"
|
| 8 |
+
LABEL org.opencontainers.image.description="Agent 偏好学习与联想引擎"
|
| 9 |
+
|
| 10 |
+
# 安装系统依赖
|
| 11 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 12 |
+
curl \
|
| 13 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
+
|
| 15 |
+
# 设置工作目录
|
| 16 |
+
WORKDIR /app
|
| 17 |
+
|
| 18 |
+
# 安装 Python 依赖
|
| 19 |
+
COPY pyproject.toml .
|
| 20 |
+
RUN pip install --no-cache-dir -e ".[train]" 2>/dev/null || \
|
| 21 |
+
pip install --no-cache-dir click sentence-transformers numpy
|
| 22 |
+
|
| 23 |
+
# 复制源码
|
| 24 |
+
COPY hermes_core/ hermes_core/
|
| 25 |
+
COPY cli/ cli/
|
| 26 |
+
COPY daemon/ daemon/
|
| 27 |
+
|
| 28 |
+
# 安装
|
| 29 |
+
RUN pip install -e .
|
| 30 |
+
|
| 31 |
+
# 预下载 embedding 模型
|
| 32 |
+
RUN python -c "from hermes_core.embedder import Embedder; Embedder()" 2>/dev/null || true
|
| 33 |
+
|
| 34 |
+
# 数据卷
|
| 35 |
+
VOLUME /root/.hermes
|
| 36 |
+
|
| 37 |
+
# 默认启动 daemon
|
| 38 |
+
CMD ["hermes", "daemon", "--foreground"]
|