Paddle-Lite
Paddle-Lite copied to clipboard
虚拟机中构建寒武纪镜像失败
-
版本、环境信息: 1)Paddle Lite 版本: 2)Host 环境:虚拟机中运行,虚拟机系统为kylin v10 sp2 4)预测后端信息:寒武纪 MLU370-x8
-
编译/安装方式信息:
参考文档构建容器失败,
# docker build --network=host -f MagicMind_ubuntu18.04_x86.Dockerfile -t paddlelite/mlu370_x86_magicmind .
Sending build context to Docker daemon 849.4MB
Step 1/25 : ARG UBUNTU_VERSION=18.04
Step 2/25 : FROM ubuntu:${UBUNTU_VERSION} AS base
---> f9a80a55f492
Step 3/25 : ARG OS_VERSION=ubuntu${UBUNTU_VERSION}
---> Using cache
---> d30450e30f39
Step 4/25 : SHELL ["/bin/bash", "-c"]
---> Using cache
---> 226b58d128b3
Step 5/25 : ENV IMAGEMAIL "http://www.cambricon.com"
---> Using cache
---> 27113bc3209f
Step 6/25 : ENV NEUWARE_HOME /usr/local/neuware
---> Using cache
---> 337130a08272
Step 7/25 : ENV LD_LIBRARY_PATH $NEUWARE_HOME/lib64:$LD_LIBRARY_PATH
---> Using cache
---> 1d0f0b61c056
Step 8/25 : ENV PATH $NEUWARE_HOME/bin:$PATH
---> Using cache
---> 5b66762aeea2
Step 9/25 : RUN mkdir -p /root/.pip && echo "[global]" > /root/.pip/pip.conf && echo "index-url = https://mirrors.ustc.edu.cn/pypi/web/simple/" >> /root/.pip/pip.conf && echo "trusted-host = mirrors.ustc.edu.cn" >> /root/.pip/pip.conf
---> Using cache
---> a0d4cb12f828
Step 10/25 : RUN sed -i s@/archive.ubuntu.com/@/mirrors.ustc.edu.cn/@g /etc/apt/sources.list && rm -fR /var/lib/apt/lists/* && mkdir /var/lib/apt/lists/partial
---> Using cache
---> 97cb4856966c
Step 11/25 : RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata && apt-get clean && rm -rf /var/lib/apt/lists/*
---> Using cache
---> c2584dc2c505
Step 12/25 : RUN apt-get update && apt-get install -y --no-install-recommends wget make cmake git apt-utils build-essential python3-pip python-pip libopencv-dev python-opencv software-properties-common vim libgl1-mesa-glx gcc zip unzip libopenblas-dev libboost-all-dev zlib1g-dev libbz2-dev libssl-dev libncurses5-dev libsqlite3-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev xz-utils libexpat1-dev liblzma-dev libffi-dev libc6-dev libgflags-dev libgoogle-glog-dev python-dev libxml2-dev libxslt-dev && apt-get clean all && rm -rf /var/lib/apt/lists/*
---> Using cache
---> 609332284469
Step 13/25 : RUN echo 'set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936'>>/etc/vim/vimrc && echo 'set termencoding=utf-8'>>/etc/vim/vimrc && echo 'set encoding=utf-8'>>/etc/vim/vimrc
---> Using cache
---> 09babbdcfa8c
Step 14/25 : RUN cd /tmp/ && sed -i "s/python3/python3.6/g" /usr/bin/lsb_release && wget -q -O py3.7.8_pkg.tgz https://www.python.org/ftp/python/3.7.8/Python-3.7.8.tgz && tar -zxvf py3.7.8_pkg.tgz && cd Python-3.7.8 && ./configure --prefix=/usr/ --enable-shared && make && make install && rm -rf /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python && cd ../ && rm -rf Python-3.7.8 && rm -f py3.7.8_pkg.tgz && pip3 install --no-cache-dir --upgrade pip
---> Using cache
---> 25a9da24ed99
Step 15/25 : RUN cd /tmp/ && pip install --no-cache-dir torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html && pip install --no-cache-dir tensorflow-cpu==2.5.0 && pip install --no-cache-dir onnx==1.7.0 && pip install --no-cache-dir onnxruntime==1.7.0 && pip install --no-cache-dir numpy && pip install --no-cache-dir paramiko==2.7.2 && pip install --no-cache-dir scipy==1.5.4 && pip install --no-cache-dir pycocotools==2.0.2 && pip install --no-cache-dir mxnet==1.8.0 && pip install --no-cache-dir opencv-python==4.5.1.48 && pip install --no-cache-dir Pillow==8.2.0 && pip install --no-cache-dir matplotlib==3.4.2 && pip install --no-cache-dir scikit-learn==0.24.2 && pip install --no-cache-dir 'protobuf >=3.19.0,<3.20.0'
---> Running in 2a588fa59895
Looking in indexes: https://mirrors.ustc.edu.cn/pypi/web/simple/
Looking in links: https://download.pytorch.org/whl/torch_stable.html
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f4263e0e990>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /whl/torch_stable.html
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f4263e21190>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /whl/torch_stable.html
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f4263dba0d0>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /whl/torch_stable.html
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f4263dba450>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /whl/torch_stable.html
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f4263dba7d0>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /whl/torch_stable.html
Collecting torch==1.6.0+cpu
Downloading https://download.pytorch.org/whl/cpu/torch-1.6.0%2Bcpu-cp37-cp37m-linux_x86_64.whl (154.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 154.6/154.6 MB 1.1 MB/s eta 0:00:00
Collecting torchvision==0.7.0+cpu
Downloading https://download.pytorch.org/whl/cpu/torchvision-0.7.0%2Bcpu-cp37-cp37m-linux_x86_64.whl (5.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.1/5.1 MB 1.1 MB/s eta 0:00:00
Collecting future (from torch==1.6.0+cpu)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/da/71/ae30dadffc90b9006d77af76b393cb9dfbfc9629f339fc1574a1c52e6806/future-1.0.0-py3-none-any.whl (491 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 491.3/491.3 kB 1.2 MB/s eta 0:00:00
Collecting numpy (from torch==1.6.0+cpu)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/6d/ad/ff3b21ebfe79a4d25b4a4f8e5cf9fd44a204adb6b33c09010f566f51027a/numpy-1.21.6-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.7/15.7 MB 1.2 MB/s eta 0:00:00
Collecting pillow>=4.1.1 (from torchvision==0.7.0+cpu)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/37/95/48565d6beb34deaacda1543b515dab9479b8fa8b9046703fd08ad447ddfe/Pillow-9.5.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 1.2 MB/s eta 0:00:00
Installing collected packages: pillow, numpy, future, torch, torchvision
Successfully installed future-1.0.0 numpy-1.21.6 pillow-9.5.0 torch-1.6.0+cpu torchvision-0.7.0+cpu
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Looking in indexes: https://mirrors.ustc.edu.cn/pypi/web/simple/
Collecting tensorflow-cpu==2.5.0
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/dc/2c/fd9f64fb7974e0b72977b6c9fff6cbabe0642a899f7c9b76767f74207920/tensorflow_cpu-2.5.0-cp37-cp37m-manylinux2010_x86_64.whl (168.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 168.3/168.3 MB 1.2 MB/s eta 0:00:00
Collecting numpy~=1.19.2 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/08/d6/a6aaa29fea945bc6c61d11f6e0697b325ff7446de5ffd62c2fa02f627048/numpy-1.19.5-cp37-cp37m-manylinux2010_x86_64.whl (14.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.8/14.8 MB 911.8 kB/s eta 0:00:00
Collecting absl-py~=0.10 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/97/75/f5e61fb67ecbe45c31035b17562464e11b91a2b8a351bae5ca0db2969e3b/absl_py-0.15.0-py3-none-any.whl (132 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.0/132.0 kB 1.4 MB/s eta 0:00:00
Collecting astunparse~=1.6.3 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/2b/03/13dde6512ad7b4557eb792fbcf0c653af6076b81e5941d36ec61f7ce6028/astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting flatbuffers~=1.12.0 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/eb/26/712e578c5f14e26ae3314c39a1bdc4eb2ec2f4ddc89b708cf8e0a0d20423/flatbuffers-1.12-py2.py3-none-any.whl (15 kB)
Collecting google-pasta~=0.2 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/a3/de/c648ef6835192e6e2cc03f40b19eeda4382c49b5bafb43d88b931c4c74ac/google_pasta-0.2.0-py3-none-any.whl (57 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.5/57.5 kB 1.8 MB/s eta 0:00:00
Collecting h5py~=3.1.0 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/9d/74/9eae2bedd8201ab464308f42c601a12d79727a1c87f0c867fdefb212c6cf/h5py-3.1.0-cp37-cp37m-manylinux1_x86_64.whl (4.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.0/4.0 MB 1.2 MB/s eta 0:00:00
Collecting keras-preprocessing~=1.1.2 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/79/4c/7c3275a01e12ef9368a892926ab932b33bb13d55794881e3573482b378a7/Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.6/42.6 kB 1.7 MB/s eta 0:00:00
Collecting opt-einsum~=3.3.0 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/bc/19/404708a7e54ad2798907210462fd950c3442ea51acc8790f3da48d2bee8b/opt_einsum-3.3.0-py3-none-any.whl (65 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.5/65.5 kB 1.7 MB/s eta 0:00:00
Collecting protobuf>=3.9.2 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/c8/2c/03046cac73f46bfe98fc846ef629cf4f84c2f59258216aa2cc0d22bfca8f/protobuf-4.24.4-cp37-abi3-manylinux2014_x86_64.whl (311 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 311.6/311.6 kB 1.3 MB/s eta 0:00:00
Collecting six~=1.15.0 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting termcolor~=1.1.0 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz (3.9 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting typing-extensions~=3.7.4 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/60/7a/e881b5abb54db0e6e671ab088d079c57ce54e8a01a3ca443f561ccadb37e/typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting wheel~=0.35 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/c7/c3/55076fc728723ef927521abaa1955213d094933dc36d4a2008d5101e1af5/wheel-0.42.0-py3-none-any.whl (65 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.4/65.4 kB 1.6 MB/s eta 0:00:00
Collecting wrapt~=1.12.1 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/82/f7/e43cefbe88c5fd371f4cf0cf5eb3feccd07515af9fd6cf7dbf1d1793a797/wrapt-1.12.1.tar.gz (27 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting gast==0.4.0 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/b6/48/583c032b79ae5b3daa02225a675aeb673e58d2cb698e78510feceb11958c/gast-0.4.0-py3-none-any.whl (9.8 kB)
Collecting tensorboard~=2.5 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/6f/77/e624b4916531721e674aa105151ffa5223fb224d3ca4bd5c10574664f944/tensorboard-2.11.2-py3-none-any.whl (6.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.0/6.0 MB 1.2 MB/s eta 0:00:00
Collecting tensorflow-estimator<2.6.0,>=2.5.0rc0 (from tensorflow-cpu==2.5.0)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/ec/78/b27f73e923becc6e79e18fe112cf75e3200d1ee35b0dba8fa46181bce56c/tensorflow_estimator-2.5.0-py2.py3-none-any.whl (462 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 462.4/462.4 kB 1.3 MB/s eta 0:00:00
INFO: pip is looking at multiple versions of tensorflow-cpu to determine which version is compatible with other requirements. This could take a while.
ERROR: Ignored the following versions that require a different python version: 1.22.0 Requires-Python >=3.8; 1.22.1 Requires-Python >=3.8; 1.22.2 Requires-Python >=3.8; 1.22.3 Requires-Python >=3.8; 1.22.4 Requires-Python >=3.8; 1.23.0 Requires-Python >=3.8; 1.23.0rc1 Requires-Python >=3.8; 1.23.0rc2 Requires-Python >=3.8; 1.23.0rc3 Requires-Python >=3.8; 1.23.1 Requires-Python >=3.8; 1.23.2 Requires-Python >=3.8; 1.23.3 Requires-Python >=3.8; 1.23.4 Requires-Python >=3.8; 1.23.5 Requires-Python >=3.8; 1.24.0 Requires-Python >=3.8; 1.24.0rc1 Requires-Python >=3.8; 1.24.0rc2 Requires-Python >=3.8; 1.24.1 Requires-Python >=3.8; 1.24.2 Requires-Python >=3.8; 1.24.3 Requires-Python >=3.8; 1.24.4 Requires-Python >=3.8; 1.25.0 Requires-Python >=3.9; 1.25.0rc1 Requires-Python >=3.9; 1.25.1 Requires-Python >=3.9; 1.25.2 Requires-Python >=3.9; 1.26.0 Requires-Python <3.13,>=3.9; 1.26.0b1 Requires-Python <3.13,>=3.9; 1.26.0rc1 Requires-Python <3.13,>=3.9; 1.26.1 Requires-Python <3.13,>=3.9; 1.26.2 Requires-Python >=3.9; 1.26.3 Requires-Python >=3.9; 1.26.4 Requires-Python >=3.9; 2.12.0 Requires-Python >=3.8; 2.12.1 Requires-Python >=3.8; 2.12.2 Requires-Python >=3.8; 2.12.3 Requires-Python >=3.8; 2.13.0 Requires-Python >=3.8; 2.14.0 Requires-Python >=3.8; 2.14.1 Requires-Python >=3.9; 2.15.0 Requires-Python >=3.9; 2.15.1 Requires-Python >=3.9; 2.15.2 Requires-Python >=3.9; 2.16.0 Requires-Python >=3.9; 2.16.1 Requires-Python >=3.9; 2.16.2 Requires-Python >=3.9; 2.4.0 Requires-Python >=3.8; 3.10.0 Requires-Python >=3.8; 3.9.0 Requires-Python >=3.8; 4.10.0 Requires-Python >=3.8; 4.10.0rc1 Requires-Python >=3.8; 4.25.0 Requires-Python >=3.8; 4.25.0rc1 Requires-Python >=3.8; 4.25.0rc2 Requires-Python >=3.8; 4.25.1 Requires-Python >=3.8; 4.25.2 Requires-Python >=3.8; 4.25.3 Requires-Python >=3.8; 4.8.0 Requires-Python >=3.8; 4.8.0rc1 Requires-Python >=3.8; 4.9.0 Requires-Python >=3.8; 4.9.0rc1 Requires-Python >=3.8; 5.26.0rc1 Requires-Python >=3.8; 5.26.0rc2 Requires-Python >=3.8; 5.26.0rc3 Requires-Python >=3.8
ERROR: Could not find a version that satisfies the requirement keras-nightly~=2.5.0.dev (from tensorflow-cpu) (from versions: none)
ERROR: No matching distribution found for keras-nightly~=2.5.0.dev
The command '/bin/bash -c cd /tmp/ && pip install --no-cache-dir torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html && pip install --no-cache-dir tensorflow-cpu==2.5.0 && pip install --no-cache-dir onnx==1.7.0 && pip install --no-cache-dir onnxruntime==1.7.0 && pip install --no-cache-dir numpy && pip install --no-cache-dir paramiko==2.7.2 && pip install --no-cache-dir scipy==1.5.4 && pip install --no-cache-dir pycocotools==2.0.2 && pip install --no-cache-dir mxnet==1.8.0 && pip install --no-cache-dir opencv-python==4.5.1.48 && pip install --no-cache-dir Pillow==8.2.0 && pip install --no-cache-dir matplotlib==3.4.2 && pip install --no-cache-dir scikit-learn==0.24.2 && pip install --no-cache-dir 'protobuf >=3.19.0,<3.20.0'' returned a non-zero code: 1
构建失败。
另外也参考了文档,但是执行后,报错没有镜像。
docker pull registry.baidubce.com/device/paddle-mlu:cntoolkit3.0.2-cnnl1.13.0
根据报错,是一些Python依赖的版本库找不到了。 No matching distribution found for keras-nightly~=2.5.0.dev。 不过这些依赖你可以选择性的剔除一些。
另外你可以参考这里的文档进行环境搭建:https://github.com/PaddlePaddle/PaddleCustomDevice/blob/develop/backends/mlu/README_cn.md
docker pull registry.baidubce.com/device/paddle-mlu:cntoolkit3.7.2-1-cnnl1.22.0-1-gcc82