agentscope-ai / agentscope-ai/agentscope-runtime
[Bug] agentscope deploy k8s xxx throw error: "unknown instruction: EOF"
- Linguagem predominante
- Python
- Estrelas
- 863
- Forks
- 168
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
## Bug Description
Error response from daemon: dockerfile parse error line 19: unknown instruction: EOF
## Affected Component
- [x] Engine
- [ ] Sandbox
- [ ] Tools
- [ ] Common
- [ ] Documentation
- [ ] Other:___________
## Reproduction Steps
1. Your code: Just a simple agent_app.py, work good.
2. How to run:
```
agentscope deploy k8s examples/runtime/mini-agent/agent_app.py \
--kube-config-path ../../../k3s-config \
--namespace xxx \
--replicas 1 \
--port 8080 \
--image-name example-deploy-agent-app \
--image-tag 0.1.0 \
--registry-url xxx \
--push \
--base-image xxx \
--requirements docker/requirements.txt \
--pypi-mirror https://pypi.tuna.tsinghua.edu.cn/simple \
--env LLM_BASE_URL="$LLM_BASE_URL" \
--env LLM_API_KEY="$LLM_API_KEY" \
--env LLM_MODEL="$LLM_MODEL"
```
4. Error occurs at: After running the previous command, a Dockerfile was generated and an error occurred when building the image
## Expected vs Actual Behavior
**Expected:** [what should happen]
**Actual:** [what actually happened]
## Error Messages
```
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/agentscope/.venv/lib/python3.12/site-packages/agentscope_runtime/engine/deployers/kubernetes_deployer.py", line 196, in deploy
built_image_name = self.image_factory.build_image(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/agentscope/.venv/lib/python3.12/site-packages/agentscope_runtime/engine/deployers/utils/docker_image_utils/image_factory.py", line 384, in build_image
return self._build_image(app, runner, config, entrypoint, use_cache)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/agents/agentscope/.venv/lib/python3.12/site-packages/agentscope_runtime/engine/deployers/utils/docker_image_utils/image_factory.py", line 292, in _build_image
raise RuntimeError(f"Runner image build failed: {e}") from e
RuntimeError: Runner image build failed: Command '['docker', 'build', '-t', 'example-deploy-agent-app:0.1.0', '--platform', 'linux/amd64', '/agentscope/.agentscope_runtime/builds/k8s_20260211_113211_802427/.agentscope_runtime']' returned non-zero
exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/agentscope/.venv/lib/python3.12/site-packages/agentscope_runtime/engine/deployers/kubernetes_deployer.py", line 227, in deploy
raise RuntimeError(f"Failed to build image: {e}") from e
RuntimeError: Failed to build image: Runner image build failed: Command '['docker', 'build', '-t', 'example-deploy-agent-app2:0.1.0', '--platform', 'linux/amd64',
'/agentscope/.agentscope_runtime/builds/k8s_20260211_113211_802427/.agentscope_runtime']' returned non-zero exit status 1.
```
## Environment
- **AgentScope Runtime Version:** agentscope-runtime[ext]==1.0.5.post1
- **Python Version:** 3.12
- **OS:** Ubuntu 20.04.5 LTS
- **Installation:** uv pip install agentscope-runtime[ext]==1.0.5.post1
## Additional Context
This is an excerpt from the generated Dockerfile, the problematic section
```
# Configure package sources for better performance
RUN rm -f /etc/apt/sources.list.d/*.list
# add aliyun mirrors
RUN echo "deb https://mirrors.aliyun.com/debian/ bookworm main contrib " "non-free non-free-firmware" > /etc/apt/sources.list && echo "deb https://mirrors.aliyun.com/debian/ bookworm-updates main " "contrib non-free non-free-firmware" >> /etc/apt/sources.list && echo "deb https://mirrors.aliyun.com/debian-security/ " "bookworm-security main contrib non-free " "non-free-firmware" >> /etc/apt/sources.list
# replace debian to aliyun
RUN mkdir -p /etc/apt/sources.list.d && cat > /etc/apt/sources.list.d/debian.sources <<'EOF'
EOF
```
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.