我正在尝试安装Kaggle/docker-pythondocker 容器到 Ubuntu 20.04 LTS。
主要问题似乎是这个错误:ERROR: tensorflow-1.13.1-cp36-cp36m-linux_x86_64.whl is not a supported wheel on this platform. The command '/bin/sh -c pip uninstall -y tensorflow && pip install /tmp/tensorflow_gpu/tensorflow*.whl && rm -rf /tmp/tensorflow_gpu && conda uninstall -y pytorch-cpu torchvision-cpu && conda install -y pytorch torchvision cudatoolkit=10.0 -c pytorch && pip uninstall -y mxnet && pip install --no-deps mxnet-cu100 && /tmp/clean-layer.sh' returned a non-zero code: 1
我已经将存储库克隆到我的电脑上,进入其文件夹“docker-python”,将项目重新设置为我需要的版本(1 父 0c13748 提交 0411f8f7b6adcf7489a837f06bb2ef6bce485151)此版本具有与当前版本相同的自述文件说明,用于本地环境设置和运行并运行
./build --gpu
它返回的是:
+ docker build --rm --pull --no-cache -t kaggle/python-gpu-build -f gpu.Dockerfile .
Sending build context to Docker daemon 2.366MB
Step 1/22 : ARG BASE_TAG=staging
Step 2/22 : FROM nvidia/cuda:9.2-cudnn7-devel-ubuntu16.04 AS nvidia
9.2-cudnn7-devel-ubuntu16.04: Pulling from nvidia/cuda
Digest: sha256:7839953f1acd44e625c3a91dcb3fe6257b89a82b296bf379ee6d4ac53ade3b01
Status: Image is up to date for nvidia/cuda:9.2-cudnn7-devel-ubuntu16.04
---> 5eb2ff1d7f52
Step 3/22 : FROM gcr.io/kaggle-images/python-tensorflow-whl:1.13.1-py36 as tensorflow_whl
1.13.1-py36: Pulling from kaggle-images/python-tensorflow-whl
Digest: sha256:a0be5fce8571d74d1163d95608c130433ff3de84da2e21e2174a9e195a165e57
Status: Image is up to date for gcr.io/kaggle-images/python-tensorflow-whl:1.13.1-py36
---> 98acbb4d059d
Step 4/22 : FROM gcr.io/kaggle-images/python:${BASE_TAG}
staging: Pulling from kaggle-images/python
Digest: sha256:3f5b8e4a4b582370ae83b80ed5e6d51a42fe532b7ee1c0d79aff14392a7195d0
Status: Image is up to date for gcr.io/kaggle-images/python:staging
---> 63d5f197c566
Step 5/22 : ADD clean-layer.sh /tmp/clean-layer.sh
---> 7fdb1435b413
Step 6/22 : COPY --from=nvidia /etc/apt/sources.list.d/cuda.list /etc/apt/sources.list.d/
---> e02dffcd6c16
Step 7/22 : COPY --from=nvidia /etc/apt/sources.list.d/nvidia-ml.list /etc/apt/sources.list.d/
---> a86c5de9a16f
Step 8/22 : COPY --from=nvidia /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/cuda.gpg
---> 6982b711cebf
Step 9/22 : ENV CUDA_VERSION=10.0.130
---> Running in b43146b862e2
Removing intermediate container b43146b862e2
---> 7c6f5a9681ba
Step 10/22 : ENV CUDA_PKG_VERSION=10-0=$CUDA_VERSION-1
---> Running in 2a136bd7f75b
Removing intermediate container 2a136bd7f75b
---> 3f0df42c0bf6
Step 11/22 : LABEL com.nvidia.volumes.needed="nvidia_driver"
---> Running in f052485fedf9
Removing intermediate container f052485fedf9
---> 682a2ef8541c
Step 12/22 : LABEL com.nvidia.cuda.version="${CUDA_VERSION}"
---> Running in 52a27ca2c0a5
Removing intermediate container 52a27ca2c0a5
---> 8dfe813ffea3
Step 13/22 : ENV PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
---> Running in 8f9e4cd191f8
Removing intermediate container 8f9e4cd191f8
---> c8233368f6cf
Step 14/22 : ENV LD_LIBRARY_PATH="/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs"
---> Running in 6f4e255fed57
Removing intermediate container 6f4e255fed57
---> 582110d74757
Step 15/22 : ENV NVIDIA_VISIBLE_DEVICES=all
---> Running in 32adea6204a5
Removing intermediate container 32adea6204a5
---> 3c80f8553a90
Step 16/22 : ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
---> Running in 60c61ba99fe1
Removing intermediate container 60c61ba99fe1
---> 53fb75b7ee40
Step 17/22 : ENV NVIDIA_REQUIRE_CUDA="cuda>=10.0"
---> Running in 702ef0fe2cb6
Removing intermediate container 702ef0fe2cb6
---> e399883a92dc
Step 18/22 : RUN apt-get update && apt-get install -y --no-install-recommends cuda-cupti-$CUDA_PKG_VERSION cuda-cudart-$CUDA_PKG_VERSION cuda-cudart-dev-$CUDA_PKG_VERSION cuda-libraries-$CUDA_PKG_VERSION cuda-libraries-dev-$CUDA_PKG_VERSION cuda-nvml-dev-$CUDA_PKG_VERSION cuda-minimal-build-$CUDA_PKG_VERSION cuda-command-line-tools-$CUDA_PKG_VERSION libcudnn7=7.5.0.56-1+cuda10.0 libcudnn7-dev=7.5.0.56-1+cuda10.0 libnccl2=2.4.2-1+cuda10.0 libnccl-dev=2.4.2-1+cuda10.0 && ln -s /usr/local/cuda-10.0 /usr/local/cuda && ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 && /tmp/clean-layer.sh
---> Running in 0f6bd3543d47
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://packages.cloud.google.com/apt gcsfuse-bionic InRelease [3724 B]
Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:6 http://packages.cloud.google.com/apt cloud-sdk-bionic InRelease [6384 B]
Ign:7 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 InRelease
Get:8 http://packages.cloud.google.com/apt cloud-sdk InRelease [6349 B]
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [2167 kB]
Ign:10 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 InRelease
Get:11 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Release [697 B]
Get:12 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 Release [564 B]
Get:13 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Release.gpg [836 B]
Get:14 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 Release.gpg [833 B]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [2118 kB]
Get:16 http://packages.cloud.google.com/apt cloud-sdk-bionic/main amd64 Packages [152 kB]
Get:17 http://packages.cloud.google.com/apt cloud-sdk/main amd64 Packages [144 kB]
Ign:18 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Packages
Get:18 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Packages [426 kB]
Get:19 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1353 kB]
Get:20 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 Packages [105 kB]
Get:21 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [1750 kB]
Fetched 8486 kB in 2s (4593 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
cuda-compiler-10-0 cuda-cublas-10-0 cuda-cublas-dev-10-0 cuda-cufft-10-0
cuda-cufft-dev-10-0 cuda-cuobjdump-10-0 cuda-curand-10-0
cuda-curand-dev-10-0 cuda-cusolver-10-0 cuda-cusolver-dev-10-0
cuda-cusparse-10-0 cuda-cusparse-dev-10-0 cuda-driver-dev-10-0 cuda-gdb-10-0
cuda-gpu-library-advisor-10-0 cuda-license-10-0 cuda-memcheck-10-0
cuda-misc-headers-10-0 cuda-npp-10-0 cuda-npp-dev-10-0 cuda-nvcc-10-0
cuda-nvdisasm-10-0 cuda-nvgraph-10-0 cuda-nvgraph-dev-10-0 cuda-nvjpeg-10-0
cuda-nvjpeg-dev-10-0 cuda-nvprof-10-0 cuda-nvprune-10-0 cuda-nvrtc-10-0
cuda-nvrtc-dev-10-0 cuda-nvtx-10-0
The following NEW packages will be installed:
cuda-command-line-tools-10-0 cuda-compiler-10-0 cuda-cublas-10-0
cuda-cublas-dev-10-0 cuda-cudart-10-0 cuda-cudart-dev-10-0 cuda-cufft-10-0
cuda-cufft-dev-10-0 cuda-cuobjdump-10-0 cuda-cupti-10-0 cuda-curand-10-0
cuda-curand-dev-10-0 cuda-cusolver-10-0 cuda-cusolver-dev-10-0
cuda-cusparse-10-0 cuda-cusparse-dev-10-0 cuda-driver-dev-10-0 cuda-gdb-10-0
cuda-gpu-library-advisor-10-0 cuda-libraries-10-0 cuda-libraries-dev-10-0
cuda-license-10-0 cuda-memcheck-10-0 cuda-minimal-build-10-0
cuda-misc-headers-10-0 cuda-npp-10-0 cuda-npp-dev-10-0 cuda-nvcc-10-0
cuda-nvdisasm-10-0 cuda-nvgraph-10-0 cuda-nvgraph-dev-10-0 cuda-nvjpeg-10-0
cuda-nvjpeg-dev-10-0 cuda-nvml-dev-10-0 cuda-nvprof-10-0 cuda-nvprune-10-0
cuda-nvrtc-10-0 cuda-nvrtc-dev-10-0 cuda-nvtx-10-0 libcudnn7 libcudnn7-dev
libnccl-dev libnccl2
0 upgraded, 43 newly installed, 0 to remove and 98 not upgraded.
Need to get 1024 MB of archives.
After this operation, 2749 MB of additional disk space will be used.
Get:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-license-10-0 10.0.130-1 [17.6 kB]
Get:2 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-nvdisasm-10-0 10.0.130-1 [22.1 MB]
Get:3 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-cuobjdump-10-0 10.0.130-1 [130 kB]
Get:4 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-gdb-10-0 10.0.130-1 [2769 kB]
Get:5 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-nvprof-10-0 10.0.130-1 [5590 kB]
Get:6 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-memcheck-10-0 10.0.130-1 [139 kB]
Get:7 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-cudart-10-0 10.0.130-1 [109 kB]
Get:8 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-driver-dev-10-0 10.0.130-1 [12.0 kB]
Get:9 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-cudart-dev-10-0 10.0.130-1 [457 kB]
Get:10 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-misc-headers-10-0 10.0.130-1 [640 kB]
Get:11 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-nvcc-10-0 10.0.130-1 [20.0 MB]
Get:12 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-cupti-10-0 10.0.130-1 [1564 kB]
Get:13 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-gpu-library-advisor-10-0 10.0.130-1 [1003 kB]
Get:14 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-nvtx-10-0 10.0.130-1 [38.9 kB]
Get:15 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-command-line-tools-10-0 10.0.130-1 [26.9 kB]
Get:16 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-nvprune-10-0 10.0.130-1 [36.8 kB]
Get:17 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-compiler-10-0 10.0.130-1 [2538 B]
Get:18 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-cublas-10-0 10.0.130-1 [30.3 MB]
Get:19 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-cublas-dev-10-0 10.0.130-1 [30.8 MB]
Get:20 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-cufft-10-0 10.0.130-1 [60.7 MB]
Get:21 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-cufft-dev-10-0 10.0.130-1 [124 MB]
Get:22 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-curand-10-0 10.0.130-1 [38.9 MB]
Get:23 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-curand-dev-10-0 10.0.130-1 [58.1 MB]
Get:24 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-cusolver-10-0 10.0.130-1 [38.4 MB]
Get:25 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-cusolver-dev-10-0 10.0.130-1 [13.2 MB]
Get:26 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-cusparse-10-0 10.0.130-1 [27.1 MB]
Get:27 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-cusparse-dev-10-0 10.0.130-1 [27.2 MB]
Get:28 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-nvrtc-10-0 10.0.130-1 [5925 kB]
Get:29 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-nvgraph-10-0 10.0.130-1 [12.8 MB]
Get:30 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-nvjpeg-10-0 10.0.130.1-1 [1302 kB]
Get:31 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-npp-10-0 10.0.130-1 [54.2 MB]
Get:32 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-libraries-10-0 10.0.130-1 [2586 B]
Get:33 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-nvrtc-dev-10-0 10.0.130-1 [9344 B]
Get:34 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-nvgraph-dev-10-0 10.0.130-1 [33.4 MB]
Get:35 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-nvjpeg-dev-10-0 10.0.130.1-1 [1086 kB]
Get:36 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-npp-dev-10-0 10.0.130-1 [55.0 MB]
Get:37 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-libraries-dev-10-0 10.0.130-1 [2606 B]
Get:38 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-minimal-build-10-0 10.0.130-1 [2552 B]
Get:39 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 cuda-nvml-dev-10-0 10.0.130-1 [51.6 kB]
Get:40 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 libcudnn7 7.5.0.56-1+cuda10.0 [151 MB]
Get:41 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 libcudnn7-dev 7.5.0.56-1+cuda10.0 [139 MB]
Get:42 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 libnccl2 2.4.2-1+cuda10.0 [34.4 MB]
Get:43 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 libnccl-dev 2.4.2-1+cuda10.0 [32.5 MB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 1024 MB in 1min 31s (11.3 MB/s)
Selecting previously unselected package cuda-license-10-0.
(Reading database ... 110556 files and directories currently installed.)
Preparing to unpack .../00-cuda-license-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-license-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-nvdisasm-10-0.
Preparing to unpack .../01-cuda-nvdisasm-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-nvdisasm-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-cuobjdump-10-0.
Preparing to unpack .../02-cuda-cuobjdump-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-cuobjdump-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-gdb-10-0.
Preparing to unpack .../03-cuda-gdb-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-gdb-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-nvprof-10-0.
Preparing to unpack .../04-cuda-nvprof-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-nvprof-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-memcheck-10-0.
Preparing to unpack .../05-cuda-memcheck-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-memcheck-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-cudart-10-0.
Preparing to unpack .../06-cuda-cudart-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-cudart-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-driver-dev-10-0.
Preparing to unpack .../07-cuda-driver-dev-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-driver-dev-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-cudart-dev-10-0.
Preparing to unpack .../08-cuda-cudart-dev-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-cudart-dev-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-misc-headers-10-0.
Preparing to unpack .../09-cuda-misc-headers-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-misc-headers-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-nvcc-10-0.
Preparing to unpack .../10-cuda-nvcc-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-nvcc-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-cupti-10-0.
Preparing to unpack .../11-cuda-cupti-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-cupti-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-gpu-library-advisor-10-0.
Preparing to unpack .../12-cuda-gpu-library-advisor-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-gpu-library-advisor-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-nvtx-10-0.
Preparing to unpack .../13-cuda-nvtx-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-nvtx-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-command-line-tools-10-0.
Preparing to unpack .../14-cuda-command-line-tools-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-command-line-tools-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-nvprune-10-0.
Preparing to unpack .../15-cuda-nvprune-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-nvprune-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-compiler-10-0.
Preparing to unpack .../16-cuda-compiler-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-compiler-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-cublas-10-0.
Preparing to unpack .../17-cuda-cublas-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-cublas-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-cublas-dev-10-0.
Preparing to unpack .../18-cuda-cublas-dev-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-cublas-dev-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-cufft-10-0.
Preparing to unpack .../19-cuda-cufft-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-cufft-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-cufft-dev-10-0.
Preparing to unpack .../20-cuda-cufft-dev-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-cufft-dev-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-curand-10-0.
Preparing to unpack .../21-cuda-curand-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-curand-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-curand-dev-10-0.
Preparing to unpack .../22-cuda-curand-dev-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-curand-dev-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-cusolver-10-0.
Preparing to unpack .../23-cuda-cusolver-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-cusolver-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-cusolver-dev-10-0.
Preparing to unpack .../24-cuda-cusolver-dev-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-cusolver-dev-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-cusparse-10-0.
Preparing to unpack .../25-cuda-cusparse-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-cusparse-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-cusparse-dev-10-0.
Preparing to unpack .../26-cuda-cusparse-dev-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-cusparse-dev-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-nvrtc-10-0.
Preparing to unpack .../27-cuda-nvrtc-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-nvrtc-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-nvgraph-10-0.
Preparing to unpack .../28-cuda-nvgraph-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-nvgraph-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-nvjpeg-10-0.
Preparing to unpack .../29-cuda-nvjpeg-10-0_10.0.130.1-1_amd64.deb ...
Unpacking cuda-nvjpeg-10-0 (10.0.130.1-1) ...
Selecting previously unselected package cuda-npp-10-0.
Preparing to unpack .../30-cuda-npp-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-npp-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-libraries-10-0.
Preparing to unpack .../31-cuda-libraries-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-libraries-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-nvrtc-dev-10-0.
Preparing to unpack .../32-cuda-nvrtc-dev-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-nvrtc-dev-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-nvgraph-dev-10-0.
Preparing to unpack .../33-cuda-nvgraph-dev-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-nvgraph-dev-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-nvjpeg-dev-10-0.
Preparing to unpack .../34-cuda-nvjpeg-dev-10-0_10.0.130.1-1_amd64.deb ...
Unpacking cuda-nvjpeg-dev-10-0 (10.0.130.1-1) ...
Selecting previously unselected package cuda-npp-dev-10-0.
Preparing to unpack .../35-cuda-npp-dev-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-npp-dev-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-libraries-dev-10-0.
Preparing to unpack .../36-cuda-libraries-dev-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-libraries-dev-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-minimal-build-10-0.
Preparing to unpack .../37-cuda-minimal-build-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-minimal-build-10-0 (10.0.130-1) ...
Selecting previously unselected package cuda-nvml-dev-10-0.
Preparing to unpack .../38-cuda-nvml-dev-10-0_10.0.130-1_amd64.deb ...
Unpacking cuda-nvml-dev-10-0 (10.0.130-1) ...
Selecting previously unselected package libcudnn7.
Preparing to unpack .../39-libcudnn7_7.5.0.56-1+cuda10.0_amd64.deb ...
Unpacking libcudnn7 (7.5.0.56-1+cuda10.0) ...
Selecting previously unselected package libcudnn7-dev.
Preparing to unpack .../40-libcudnn7-dev_7.5.0.56-1+cuda10.0_amd64.deb ...
Unpacking libcudnn7-dev (7.5.0.56-1+cuda10.0) ...
Selecting previously unselected package libnccl2.
Preparing to unpack .../41-libnccl2_2.4.2-1+cuda10.0_amd64.deb ...
Unpacking libnccl2 (2.4.2-1+cuda10.0) ...
Selecting previously unselected package libnccl-dev.
Preparing to unpack .../42-libnccl-dev_2.4.2-1+cuda10.0_amd64.deb ...
Unpacking libnccl-dev (2.4.2-1+cuda10.0) ...
Setting up libcudnn7 (7.5.0.56-1+cuda10.0) ...
Setting up libnccl2 (2.4.2-1+cuda10.0) ...
Setting up libcudnn7-dev (7.5.0.56-1+cuda10.0) ...
update-alternatives: using /usr/include/x86_64-linux-gnu/cudnn_v7.h to provide /usr/include/cudnn.h (libcudnn) in auto mode
Setting up cuda-license-10-0 (10.0.130-1) ...
*** LICENSE AGREEMENT ***
By using this software you agree to fully comply with the terms and
conditions of the EULA (End User License Agreement). The EULA is located
at /usr/local/cuda-10.0/doc/EULA.txt. The EULA can also be found at
http://docs.nvidia.com/cuda/eula/index.html. If you do not agree to the
terms and conditions of the EULA, do not use the software.
Setting up cuda-nvdisasm-10-0 (10.0.130-1) ...
Setting up cuda-nvml-dev-10-0 (10.0.130-1) ...
Setting up cuda-nvprof-10-0 (10.0.130-1) ...
Setting up cuda-nvrtc-10-0 (10.0.130-1) ...
Setting up cuda-nvtx-10-0 (10.0.130-1) ...
Setting up cuda-nvgraph-10-0 (10.0.130-1) ...
Setting up cuda-nvprune-10-0 (10.0.130-1) ...
Setting up libnccl-dev (2.4.2-1+cuda10.0) ...
Setting up cuda-cusparse-10-0 (10.0.130-1) ...
Setting up cuda-cuobjdump-10-0 (10.0.130-1) ...
Setting up cuda-nvjpeg-10-0 (10.0.130.1-1) ...
Setting up cuda-gdb-10-0 (10.0.130-1) ...
Setting up cuda-nvjpeg-dev-10-0 (10.0.130.1-1) ...
Setting up cuda-cufft-10-0 (10.0.130-1) ...
Setting up cuda-cudart-10-0 (10.0.130-1) ...
Setting up cuda-npp-10-0 (10.0.130-1) ...
Setting up cuda-cufft-dev-10-0 (10.0.130-1) ...
Setting up cuda-cusolver-10-0 (10.0.130-1) ...
Setting up cuda-misc-headers-10-0 (10.0.130-1) ...
Setting up cuda-curand-10-0 (10.0.130-1) ...
Setting up cuda-driver-dev-10-0 (10.0.130-1) ...
Setting up cuda-gpu-library-advisor-10-0 (10.0.130-1) ...
Setting up cuda-cublas-10-0 (10.0.130-1) ...
Setting up cuda-nvgraph-dev-10-0 (10.0.130-1) ...
Setting up cuda-cudart-dev-10-0 (10.0.130-1) ...
Setting up cuda-memcheck-10-0 (10.0.130-1) ...
Setting up cuda-nvrtc-dev-10-0 (10.0.130-1) ...
Setting up cuda-npp-dev-10-0 (10.0.130-1) ...
Setting up cuda-nvcc-10-0 (10.0.130-1) ...
Setting up cuda-curand-dev-10-0 (10.0.130-1) ...
Setting up cuda-cusparse-dev-10-0 (10.0.130-1) ...
Setting up cuda-cusolver-dev-10-0 (10.0.130-1) ...
Setting up cuda-cublas-dev-10-0 (10.0.130-1) ...
Setting up cuda-libraries-dev-10-0 (10.0.130-1) ...
Setting up cuda-cupti-10-0 (10.0.130-1) ...
Setting up cuda-command-line-tools-10-0 (10.0.130-1) ...
Setting up cuda-libraries-10-0 (10.0.130-1) ...
Setting up cuda-compiler-10-0 (10.0.130-1) ...
Setting up cuda-minimal-build-10-0 (10.0.130-1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
+ rm -rf '/root/.cache/pip/*'
+ apt-get autoremove -y
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 102 not upgraded.
+ apt-get clean
+ rm -rf '/usr/local/src/*'
+ conda clean -y --tarballs
Cache location:
There are no tarballs to remove
Removing intermediate container 0f6bd3543d47
---> 772f18453069
Step 19/22 : COPY --from=tensorflow_whl /tmp/tensorflow_gpu/*.whl /tmp/tensorflow_gpu/
---> 755988937ab8
Step 20/22 : RUN pip uninstall -y tensorflow && pip install /tmp/tensorflow_gpu/tensorflow*.whl && rm -rf /tmp/tensorflow_gpu && conda uninstall -y pytorch-cpu torchvision-cpu && conda install -y pytorch torchvision cudatoolkit=10.0 -c pytorch && pip uninstall -y mxnet && pip install --no-deps mxnet-cu100 && /tmp/clean-layer.sh
---> Running in af6d3b9dbdd4
Found existing installation: tensorflow 2.3.1
Uninstalling tensorflow-2.3.1:
Successfully uninstalled tensorflow-2.3.1
ERROR: tensorflow-1.13.1-cp36-cp36m-linux_x86_64.whl is not a supported wheel on this platform.
The command '/bin/sh -c pip uninstall -y tensorflow && pip install /tmp/tensorflow_gpu/tensorflow*.whl && rm -rf /tmp/tensorflow_gpu && conda uninstall -y pytorch-cpu torchvision-cpu && conda install -y pytorch torchvision cudatoolkit=10.0 -c pytorch && pip uninstall -y mxnet && pip install --no-deps mxnet-cu100 && /tmp/clean-layer.sh' returned a non-zero code: 1
- 测试
./test --gpu
- 输出
./test --gpu
+ rm -rf /tmp/python-build
+ docker rm jupyter_test
Error: No such container: jupyter_test
+ true
+ mkdir -p /tmp/python-build/tmp
+ mkdir -p /tmp/python-build/devshm
+ mkdir -p /tmp/python-build/working
+ docker run -d --name=jupyter_test --read-only --net=none -e HOME=/tmp -v /home/fanatical/Documents/docker-python:/input:ro -v /tmp/python-build/working:/working -w=/working -v /tmp/python-build/tmp:/tmp -v /tmp/python-build/devshm:/dev/shm kaggle/python-gpu-build jupyter notebook --allow-root '--ip=*'
Unable to find image 'kaggle/python-gpu-build:latest' locally
docker: Error response from daemon: pull access denied for kaggle/python-gpu-build, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
docker run --runtime nvidia --rm -it gcr.io/kaggle-gpu-images/python /bin/bash
返回
docker: Error response from daemon: OCI runtime create failed:
container_linux.go:349: starting container process caused
"process_linux.go:449: container init caused \"process_linux.go:432:
running prestart hook 1 caused \\\"error running hook:
exit status 1, stdout: , stderr: nvidia-container-cli: initialization
error: driver
error: failed to process request\\\\n\\\"\"": unknown.
解决方案 1 我试过了
git clone https://github.com/Kaggle/docker-python.git
在项目根目录下docker-python/
,运行./build --gpu
。
将以下内容放入.bash_profile
[在 macos 中称为:bash_profile,在 linux 中称为:bashrc] 在 [linux][https://askubuntu.com/questions/127056/where-is-bashrc] 它是主文件夹中的隐藏文件,这如何编辑它
我无法完成这一部分,因为它和之前的部分是一样的
kjupyter() {
docker run --runtime=nvidia -v $PWD:/tmp/working -v
/data:/tmp/working/data -w=/tmp/working -p 8888:8888 --rm -it
kaggle/python-gpu-build
bash -c "export LD_LIBRARY_PATH=/usr/local/cuda/lib64;
pip install jupyter_contrib_nbextensions;
pip install jupyter_nbextensions_configurator;
jupyter contrib nbextension install --user;
jupyter notebook --notebook-dir=/tmp/working --ip='*' --port=8888 --no-browser --allow-root" }
比跑source .bash_profile
export LD_LIBRARY_PATH=/usr/local/cuda/lib64
现在您可以kjupyter
从终端运行并转到http://localhost:8888/
jupyter notebook。Nbextensions 的处理方式与 CPU 版本类似。
答案1
也许你可以用以下方式运行克隆的 githubsudo ./build --gpu
或第二种方式
sudo docker pull gcr.io/kaggle-gpu-images/python
更新.bashrc
(/home
它被隐藏,因此视图被隐藏)。请添加以下行
kjupyter() {
sudo docker run --runtime=nvidia -v $PWD:/tmp/working -v
/data:/tmp/working/data -w=/tmp/working -p 8888:8888 --rm -it
gcr.io/kaggle-gpu-images/python
bash -c "export LD_LIBRARY_PATH=/usr/local/cuda/lib64;
pip install jupyter_contrib_nbextensions;
pip install jupyter_nbextensions_configurator;
jupyter contrib nbextension install --user;
jupyter notebook --notebook-dir=/tmp/working --ip='*' --port=8888 --no-browser --allow-root" }
然后source .bashrc
在终端中输入.bashrc
目录位置(/home
)。
最后kjupyter
在终端运行