Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -7
Dockerfile
CHANGED
|
@@ -9,14 +9,16 @@ RUN git clone https://github.com/Panniantong/agent-reach.git /opt/agent-reach
|
|
| 9 |
# 使用 --system 允许在 Docker 根环境下直接通过 pip 强行安装,跳过 Hatchling 的重复文件检查限制
|
| 10 |
RUN pip install -e /opt/agent-reach
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
|
| 14 |
-
# 1.
|
| 15 |
-
|
| 16 |
|
| 17 |
-
# 2. 放开安装目录权限
|
| 18 |
RUN chmod -R 777 /opt/agent-reach
|
| 19 |
|
| 20 |
-
# 3.
|
| 21 |
-
|
|
|
|
|
|
|
| 22 |
CMD ["python", "-m", "uvicorn", "agent_reach.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 9 |
# 使用 --system 允许在 Docker 根环境下直接通过 pip 强行安装,跳过 Hatchling 的重复文件检查限制
|
| 10 |
RUN pip install -e /opt/agent-reach
|
| 11 |
|
| 12 |
+
# 之前的 git clone 和 pip install -e 部分保持不变...
|
| 13 |
+
|
| 14 |
+
# 1. 显式安装 uvicorn 和 fastapi (确保它能被拉起)
|
| 15 |
+
RUN pip install --no-cache-dir uvicorn fastapi
|
| 16 |
|
| 17 |
+
# 2. 放开安装目录权限
|
| 18 |
RUN chmod -R 777 /opt/agent-reach
|
| 19 |
|
| 20 |
+
# 3. 声明端口
|
| 21 |
+
EXPOSE 7860
|
| 22 |
+
|
| 23 |
+
# 4. 启动服务
|
| 24 |
CMD ["python", "-m", "uvicorn", "agent_reach.main:app", "--host", "0.0.0.0", "--port", "7860"]
|