deerflow2/memo.md

28 lines
928 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

1. 网络连接问题
local_backend.py中使用localhost访问sandbox容器
但在Docker容器内部localhost指向容器自身而不是主机
需要改为host.docker.internal
1. 修改网络配置
文件: backend/src/community/aio_sandbox/local_backend.py
第116行: 添加sandbox_host = "host.docker.internal"
第119行: 将sandbox_url=f"http://localhost:{port}"改为sandbox_url=f"http://{sandbox_host}:{port}"
第166-167行: 同样修改了discover方法中的URL构建
2. Docker socket挂载问题
gateway和langgraph容器需要访问Docker守护进程来启动sandbox容器
但容器没有挂载Docker socket
2. 添加Docker socket挂载
文件: docker/docker-compose-dev.yaml
为gateway和langgraph服务添加
volumes:
# Mount Docker socket for aio sandbox
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
# Docker environment for aio sandbox
- DOCKER_HOST=unix:///var/run/docker.sock