mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
issue: pyodide.loadPackage behind proxy not working, env variables not considered #1321
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jabbasj on GitHub (Jun 19, 2024).
It seems like ENV Variables HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy are not respected here... so I am not able to build my own docker image behind a proxy
=> ERROR [build 14/14] RUN npm run build 7.7s
@tjbck commented on GitHub (Jun 19, 2024):
PR Welcome!
@tcarwash commented on GitHub (Jun 24, 2024):
@jabbasj are you using
--build-args HTTP_PROXY="proxy.yourdoman.tld"in your docker build command to specify your proxy? It looks like--envis only used at runtime@jabbasj commented on GitHub (Jun 25, 2024):
I had my daemon configured to use the proxy based on this guide: https://docs.docker.com/config/daemon/proxy/
sudo systemctl show --property=Environment dockerEnvironment=HTTP_PROXY=proxy.yourdoman.tld HTTPS_PROXY=proxy.yourdoman.tld http_proxy=proxy.yourdoman.tld https_proxy=proxy.yourdoman.tld no_proxy=localhost,127.0.0.1,localaddress,localdomain.com NO_PROXY=localhost,127.0.0.1,localaddress,localdomain.comBut based on your feedback, I tried passing --build-arg HTTP_PROXY="proxy.yourdoman.tld" --build-arg HTTPS_PROXY="proxy.yourdoman.tld" --build-arg http_proxy="proxy.yourdoman.tld" --build-arg https_proxy="proxy.yourdoman.tld" explicitly
and also tried modifying
~/.docker/config.jsonNo luck :(
@bright-ren commented on GitHub (Jun 28, 2024):
Also have this issue, my walk around is to make a base build image with pyodide + micropip downloaded, and then use the base image to build final image behind proxy.
@jabbasj commented on GitHub (Jun 28, 2024):
Ya that's fair, you can also just copy the pre-downloaded files directly into the static directory as a work-around but I chose to simply disable this feature entirely since executing python generated by the LLM in the browser isn't very useful for my use-case (this doesn't affect the ability to use Tools)
@bright-ren commented on GitHub (Jul 13, 2024):
[> > Also have this issue, my walk around is to make a base build image with pyodide + micropip downloaded, and then use the base image to build final image behind proxy.
Maybe you can try something like: https://github.com/gajus/global-agent?](https://github.com/pyodide/pyodide/issues/4891#issuecomment-2198004864)
global-agent works for me,modify package.json
"pyodide:fetch": "npm i global-agent --save-dev && GLOBAL_AGENT_HTTPS_PROXY=$HTTPS_PROXY GLOBAL_AGENT_HTTP_PROXY=$HTTP_PROXY node -r global-agent/bootstrap scripts/prepare-pyodide.js"@stringang commented on GitHub (Aug 20, 2024):
@bright-ren Could you share your Dockerfile? This would help me better resolve the issue.
@gaussiangit commented on GitHub (Oct 16, 2024):
any solution on this ? CDN is blocked by proxy, micropip and packaging does not work !
I tried https://github.com/open-webui/open-webui/issues/3304#issuecomment-2226727199 but did not work