Vis*_*sio 5 pypi docker python-poetry
我一直在尝试构建一个使用诗歌命令安装依赖项的 docker 映像RUN poetry install。
我将其作为docker buildGitLab CI/CD 管道工作的一部分,在自己的运行器 VM 实例上运行它。但是,docker 构建过程在使用 运行
期间反复崩溃,然后在处理此错误期间使用和错误。
下面是一些错误示例:poetry installCalledProcessErrorEnvCommandErrorPoetryException
CalledProcessError
Command '['/home/ray/anaconda3/bin/python', '/home/ray/anaconda3/lib/python3.9/site-packages/virtualenv/seed/wheels/embed/pip-22.0.4-py3-none-any.whl/pip', 'install', '--disable-pip-version-check', '--prefix', '/home/ray/anaconda3', '--no-deps', '/home/ray/.cache/pypoetry/artifacts/a8/b9/10/d38e9304d486f9398ab4163054bd6af79c74073ad8685d6cc67f88eccc/Werkzeug-2.2.2-py3-none-any.whl']' returned non-zero exit status 1.
Run Code Online (Sandbox Code Playgroud)
然后
EnvCommandError
Command ['/home/ray/anaconda3/bin/python', '/home/ray/anaconda3/lib/python3.9/site-packages/virtualenv/seed/wheels/embed/pip-22.0.4-py3-none-any.whl/pip', 'install', '--disable-pip-version-check', '--prefix', '/home/ray/anaconda3', '--no-deps', '/home/ray/.cache/pypoetry/artifacts/a8/b9/10/d38e9304d486f9398ab4163054bd6af79c74073ad8685d6cc67f88eccc/Werkzeug-2.2.2-py3-none-any.whl'] errored with the following return code 1, and output:
WARNING: Ignoring invalid distribution -irtualenv (/home/ray/anaconda3/lib/python3.9/site-packages)
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/home/ray/anaconda3/lib/python3.9/site-packages/virtualenv/seed/wheels/embed/pip-22.0.4-py3-none-any.whl'
Run Code Online (Sandbox Code Playgroud)
然后还PoetryException报错:
PoetryException
Failed to install /home/ray/.cache/pypoetry/artifacts/a8/b9/10/d38e9304d486f9398ab4163054bd6af79c74073ad8685d6cc67f88eccc/Werkzeug-2.2.2-py3-none-any.whl
at anaconda3/lib/python3.9/site-packages/poetry/utils/pip.py:55 in pip_install
Run Code Online (Sandbox Code Playgroud)
Werkzeug-2.2.2(上面列出的)和torch-1.11.0(未列出以节省空间)会发生相同的一系列错误。
我尝试了以下操作但没有成功:
pip cache purge/home/ray/.cache/pypoetry/artifacts/a8/b9/10/d38e9304d486f9398ab4163054bd6af79c74073ad8685d6cc67f88eccc/Werkzeug-2.2.2-py3-none-any.whl如果需要,我可以共享 docker 文件。
我将不胜感激任何帮助!
RUN pip install -U pip virtualenv
Run Code Online (Sandbox Code Playgroud)
Poetrypip在启动时从virtualenv带有virtualenv.seed.wheels.embed.get_embed_wheel. 看起来可以在运行virtualenv时更新,并且该路径变得无效。poetry install
| 归档时间: |
|
| 查看次数: |
2802 次 |
| 最近记录: |