Closed xxll88 closed 6 months ago
That's weird. Because you are pulling image from docker hub when you uses docker compose up
. It doesn't require install dependency manually. Can you provide detailed log when using docker compose up
or anything that can help use reproduce this issue.
I met the same issue, the code version is 1.00, and I execute docker command 'docker compose build' first , and then use 'docker compose up', and this issue will come up. Also I found a way to work around:
# switch to \XAgent-1.0.0\dockerfiles\ToolServerNode\ directory
# modify 'Dockerfile' file
# find the row 'RUN pip install playwright && playwright install chromium && playwright install-deps', and insert the following row
RUN pip install httpx[http2]
# Notes:after finish above action, to run 'docker compose build' 'docker compose up' again
@liruixue Can you try to use lastest code?
Sure, I will try it when I have free time.
@liruixue Can you try to use lastest code?
I tried the latest main code, it works fine, no need any further changes on 'Dokcerfile' file.
I have encountered the same issue and solved it. Here are the details:
Solution:
httpx[http2]
into the file: XAgent/ToolServer/ToolServerNode/requirements.txt docker-compose build
Why?
This issue happens when you build docker images locally with command docker-compose build
and it seems the requirements in local file missing the package httpx[http2]
.
Besides, I also tried docker-compose up
remotely (download the latest online images.), it works fine.
@Starfruit007 We have confirmed this issue and waiting for someone to open a pull request. :)
docker compose up : File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1389, in init xagent-ToolServerNode-1 | raise ImportError( xagent-ToolServerNode-1 | ImportError: Using http2=True, but the 'h2' package is not installed. Make sure to install httpx using
pip install httpx[http2]
. xagent-ToolServerNode-1 | xagent-ToolServerNode-1 | ERROR: Application startup failed. Exiting.sudo docker exec XAgent-Server pip install httpx[http2] 可以安装,但无效