torchvision=0.4.0 causes docker image build fail
nlantau opened this issue · comments
λ DLTFpT > sudo docker build -t dltfpt-stack . git master
Password:
[+] Building 137.5s (7/14)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 37B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/jupyter/scipy-notebook:2ce7c06a61a1 1.4s
=> [ 1/11] FROM docker.io/jupyter/scipy-notebook:2ce7c06a61a1@sha256:c2df5ef3c25702b7b8c54489ee9736a64ab431307b5416648226974e61 0.0s
=> CACHED [ 2/11] RUN pip install tensorflow==2.0.0 0.0s
=> CACHED [ 3/11] RUN pip install https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp37-cp37m-linux_x86_64.whl 0.0s
=> ERROR [ 4/11] RUN pip install torchvision==0.4.0 135.9s
------
> [ 4/11] RUN pip install torchvision==0.4.0:
#7 1.701 Collecting torchvision==0.4.0
#7 2.018 Downloading https://files.pythonhosted.org/packages/51/83/2d77d040e34bd8f70dcb4770f7eb7d0aa71e07738abf6831be863ade00db/torchvision-0.4.0-cp37-cp37m-manylinux1_x86_64.whl (8.8MB)
#7 3.976 Requirement already satisfied: pillow>=4.1.1 in /opt/conda/lib/python3.7/site-packages (from torchvision==0.4.0) (6.1.0)
#7 3.981 Requirement already satisfied: numpy in /opt/conda/lib/python3.7/site-packages (from torchvision==0.4.0) (1.17.0)
#7 3.984 Requirement already satisfied: six in /opt/conda/lib/python3.7/site-packages (from torchvision==0.4.0) (1.12.0)
#7 3.987 Collecting torch==1.2.0 (from torchvision==0.4.0)
#7 4.090 Downloading https://files.pythonhosted.org/packages/05/65/5248be50c55ab7429dd5c11f5e2f9f5865606b80e854ca63139ad1a584f2/torch-1.2.0-cp37-cp37m-manylinux1_x86_64.whl (748.9MB)
#7 135.7 Killed
------
executor failed running [/bin/sh -c pip install torchvision==0.4.0]: exit code: 137
Tried changing it to torchvision=0.3.2
, which makes for a successful docker image build, although I'm having issues launching the notebook. Continuing debugging.
Hi @nlantau ! Can you please confirm whether you're following these installation instructions verbatim?
I'm a bit perplexed as to what the issue could possibly be because I haven't changed the Dockerfile since December 2019 and nobody has ever reported any issues with installation.
I had the same issue... Problem solved. It was Docker running with not enough memory. Just increase the default 2.0GB to 2.5GB and it will build fine.