代理配置
企业内网需要配置代理访问外网。环境变量设置:export http_proxy=http://proxy.example.com:8080、export https_proxy=http://proxy.example.com:8080。Git代理:git config --global http.proxy http://proxy.example.com:8080。
pip镜像配置
配置pip使用国内镜像:pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple。或在pip.conf中添加index-url配置。
模型API配置
使用OpenAI API需要配置:export OPENAI_API_KEY=sk-xxx。使用Azure OpenAI需要配置endpoint和API版本。国产模型如智谱AI需要配置相应的API Key。
Docker网络
Docker网络配置:创建自定义网络docker network create openclaw-net。容器互联使用网络别名。端口映射在docker-compose.yml中配置。