使用sh tools/build_docker_cpu.sh执行失败
你好: 我下载最新的turbotransformers程序编译,使用命令sh tools/build_docker_cpu.sh 这一步就报了很多库冲突,这个问题该怎么解决呢,一部分报错信息如下
Package jupyterlab conflicts for: _ipyw_jlab_nb_ext_conf -> jupyterlab anaconda==2021.05 -> jupyterlab==3.0.14=pyhd3eb1b0_1
Package perl conflicts for: git -> perl[version='5.*|>=5.26.2,<5.26.3.0a0|>=5.26.2,<5.27.0a0'] gperftools -> perl
Package libvorbis conflicts for: gst-plugins-base -> libvorbis[version='>=1.3.7,<1.4.0a0'] qt -> gst-plugins-base[version='>=1.18.3,<1.19.0a0'] -> libvorbis[version='>=1.3.7,<1.4.0a0']
Package conda-env conflicts for: conda-token -> conda[version='>=4.3'] -> conda-env[version='>=2.6'] conda-build -> conda[version='>=4.5'] -> conda-env[version='>=2.5|>=2.6']
The command '/bin/sh -c /opt/conda/bin/conda install pytorch==1.5.0 cpuonly -c pytorch && pip install OpenNMT-py onnxruntime==1.4.0 && /opt/conda/bin/conda install curl conda-verify conda-build mkl-include cmake -c anaconda && /opt/conda/bin/conda install make cmake git graphviz gperftools git-lfs docopt -c conda-forge && /opt/conda/bin/conda clean -afy' returned a non-zero code: 1
把冲突的包卸载了吧
@feifeibear 您好,我在执行sh tools/build_docker_cpu.sh时也遇到了同样的问题,存在大量的库冲突,如果一个个卸载,这样太耗时间了,请问还有什么其他便捷的方法来解决吗?非常感谢!
应该是continuumio/anaconda3升级导致的
https://hub.docker.com/r/continuumio/anaconda3/tags?page=1&ordering=last_updated 可以把dockerfile改成
FROM continuumio/anaconda3:2020.07
@feifeibear 感谢您的答复,我现在把dockerfile改成FROM continuumio/anaconda3:2020.07,但是会有新的报错,看着像是python版本不兼容,但是我的环境中python版本是2.7,也不像报错信息中说的3.8版本啊,详细报错信息如下,不知道能否指导下我是哪块没弄对呢:
Step 4/9 : RUN /opt/conda/bin/conda install pytorch==1.3.1 cpuonly -c pytorch && pip install OpenNMT-py==1.1.1 && /opt/conda/bin/conda install curl conda-verify conda-build mkl-include cmake -c anaconda && /opt/conda/bin/conda install make cmake git graphviz gperftools git-lfs docopt -c conda-forge && /opt/conda/bin/conda clean -afy ---> Running in f6a565ee2278 Collecting package metadata (current_repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve. Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed
UnsatisfiableError: The following specifications were found to be incompatible with the existing python installation in your environment:
Specifications:
- pytorch==1.3.1 -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0']
Your python: python=3.8
If python is on the left-most side of the chain, that's the version you've asked for. When python appears to the right, that indicates that the thing on the left is somehow not available for the python version you are constrained to. Note that conda will not change your python version to a different minor version unless you explicitly specify that.
The command '/bin/sh -c /opt/conda/bin/conda install pytorch==1.3.1 cpuonly -c pytorch && pip install OpenNMT-py==1.1.1 && /opt/conda/bin/conda install curl conda-verify conda-build mkl-include cmake -c anaconda && /opt/conda/bin/conda install make cmake git graphviz gperftools git-lfs docopt -c conda-forge && /opt/conda/bin/conda clean -afy' returned a non-zero code: 1