Docker build error

I tried building the pytorch/docker/pytorch/dockerfile using two ways

  1. in the docker/pytorch/ directory

docker build -t pytorch_build:1.0 .

i got the following error
Package numpy conflicts for:
numpy
scipy -> numpy[version=’>=1.11.3,<2.0a0|>=1.14.6,<2.0a0|>=1.15.1,<2.0a0|>=1.9.3,<2.0a0’]

Package wheel conflicts for:
pip -> wheel
python=3.8 -> pip -> wheel
wheel

Package pycparser conflicts for:
cffi -> pycparser
pycparser
cryptography -> cffi[version=’>=1.8’] -> pycparser

The command ‘/bin/sh -c curl -o ~/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && chmod +x ~/miniconda.sh && ~/miniconda.sh -b -p /opt/conda && rm ~/miniconda.sh && /opt/conda/bin/conda install -y python=$PYTHON_VERSION numpy pyyaml scipy ipython mkl mkl-include ninja cython typing && /opt/conda/bin/conda install -y -c pytorch magma-cuda100 && /opt/conda/bin/conda clean -ya’ returned a non-zero code: 1

  1. using the Makefile

i used $ sudo make -f docker.Makefile

got the following error:

=> ERROR [conda 1/1] RUN curl -v -o ~/miniconda.sh -O https:// repo.continuum .io/miniconda/Miniconda3-latest-Linux-x86_64.sh && chmod +x ~/miniconda.sh && ~/miniconda.sh -b -p /opt/conda 3.8s
=> CANCELED [submodule-update 2/3] COPY . . 3.9s

[conda 1/1] RUN curl -v -o ~/miniconda.sh -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && chmod +x ~/miniconda.sh && ~/miniconda.sh -b -p /opt/conda && rm ~/miniconda.sh && /opt/conda/bin/conda install -y python=${PYTHON_VERSION} conda-build pyyaml numpy ipython&& /opt/conda/bin/conda clean -ya:
#11 0.590 % Total % Received % Xferd Average Speed Time Time Time Current
#11 0.590 Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0* Trying 104.18.200.79…
#11 0.843 * TCP_NODELAY set
#11 0.871 * Connected to repo.continuum .io (104.18.200.79) port 443 (#0)
#11 0.875 * ALPN, offering h2
#11 0.875 * ALPN, offering http/1.1
#11 0.894 * successfully set certificate verify locations:
#11 0.894 * CAfile: /etc/ssl/certs/ca-certificates.crt
#11 0.894 CApath: /etc/ssl/certs
#11 0.895 } [5 bytes data]
#11 0.895 * TLSv1.3 (OUT), TLS handshake, Client hello (1):
#11 0.895 } [512 bytes data]
#11 0.930 * TLSv1.3 (IN), TLS handshake, Server hello (2):
#11 0.930 { [104 bytes data]
#11 0.930 * TLSv1.2 (IN), TLS handshake, Certificate (11):
#11 0.930 { [2206 bytes data]
#11 0.932 * TLSv1.2 (IN), TLS handshake, Server key exchange (12):
#11 0.932 { [115 bytes data]
#11 0.932 * TLSv1.2 (IN), TLS handshake, Server finished (14):
#11 0.932 { [4 bytes data]
#11 0.932 * TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
#11 0.932 } [37 bytes data]
#11 0.933 * TLSv1.2 (OUT), TLS change cipher, Client hello (1):
#11 0.933 } [1 bytes data]
#11 0.933 * TLSv1.2 (OUT), TLS handshake, Finished (20):
#11 0.933 } [16 bytes data]
#11 0.961 * TLSv1.2 (IN), TLS handshake, Finished (20):
#11 0.961 { [16 bytes data]
#11 0.961 * SSL connection using TLSv1.2 / ECDHE-ECDSA-CHACHA20-POLY1305
#11 0.961 * ALPN, server accepted to use h2
#11 0.961 * Server certificate:
#11 0.961 * subject: C=US; ST=CA; L=San Francisco; O=Cloudflare, Inc.; CN=sni.cloudflaressl .com
#11 0.961 * start date: Apr 6 00:00:00 2020 GMT
#11 0.961 * expire date: Oct 9 12:00:00 2020 GMT
#11 0.962 * subjectAltName: host repo.continuum.i o matched cert’s “*.continuum.io”
#11 0.962 * issuer: C=US; ST=CA; L=San Francisco; O=CloudFlare, Inc.; CN=CloudFlare Inc ECC CA-2
#11 0.962 * SSL certificate verify ok.
#11 0.962 * Using HTTP2, server supports multi-use
#11 0.962 * Connection state changed (HTTP/2 confirmed)
#11 0.962 * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
#11 0.962 } [5 bytes data]
#11 0.962 * Using Stream ID: 1 (easy handle 0x5594f99cf580)
#11 0.962 } [5 bytes data]
#11 0.963 > GET /miniconda/Miniconda3-latest-Linux-x86_64.sh HTTP/2
#11 0.963 > Host: repo.continuum.i o
#11 0.963 > User-Agent: curl/7.58.0
#11 0.963 > Accept: /
#11 0.963 >
#11 0.963 { [5 bytes data]
#11 0.963 * Connection state changed (MAX_CONCURRENT_STREAMS updated)!
#11 0.963 } [5 bytes data]
#11 1.022 < HTTP/2 301
#11 1.022 < date: Thu, 23 Apr 2020 03:42:56 GMT
#11 1.022 < cache-control: max-age=3600
#11 1.022 < expires: Thu, 23 Apr 2020 04:42:56 GMT
#11 1.022 < location: https:/ /repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
#11 1.022 < expect-ct: max-age=604800, report-uri=“https:/ /report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
#11 1.022 < server: cloudflare
#11 1.022 < cf-ray: 588493d40fa9df63-BOM
#11 1.022 < cf-request-id: 0246bab8800000df6320900200000001
#11 1.022 <
#11 1.022 { [0 bytes data]
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
#11 1.022 * Connection #0 to host repo.continuum .io left intact
#11 1.037 /bin/sh: 1: /opt/conda/bin/conda: not found


failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: rpc error: code = Unknown desc = failed to build LLB: executor failed running [/bin/sh -c curl -v -o ~/miniconda.sh -O h ttps://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && chmod +x ~/miniconda.sh && ~/miniconda.sh -b -p /opt/conda && rm ~/miniconda.sh && /opt/conda/bin/conda install -y python=${PYTHON_VERSION} conda-build pyyaml numpy ipython&& /opt/conda/bin/conda clean -ya]: runc did not terminate sucessfully
docker.Makefile:32: recipe for target ‘devel-image’ failed
make: *** [devel-image] Error 1

Im using ubuntu 18.04.4 with geforce 940mx
docker version Docker version 19.03.8
and nvidia-docker2 installed alongside

Could you try to use wget instead of curl or curl -Ssl, as the download of miniconda seems to fail?

here is the dockerfile which i had used

im still getting and error seems to be in package conflicts

Package cryptography conflicts for:
cryptography
urllib3 -> cryptography[version=’>=1.3.4’]
urllib3 -> pyopenssl[version=’>=0.14’] -> cryptography[version=’>=1.9|>=2.1.4|>=2.2.1|>=2.8’]
conda[version=’>=4.8.2’] -> pyopenssl[version=’>=16.2.0’] -> cryptography[version=’>=1.9|>=2.1.4|>=2.2.1|>=2.8’]
requests -> urllib3[version=’>=1.21.1,<1.26,!=1.25.0,!=1.25.1’] -> cryptography[version=’>=1.3.4’]
pyopenssl -> cryptography[version=’>=1.9|>=2.1.4|>=2.2.1|>=2.8’]

Package pycosat conflicts for:
pycosat
conda[version=’>=4.8.2’] -> pycosat[version=’>=0.6.3’]

Package idna conflicts for:
conda[version=’>=4.8.2’] -> requests[version=’>=2.18.4,<3’] -> idna[version=’>=2.5,<2.7|>=2.5,<2.8|>=2.5,<2.9|>=2.5,<3’]
urllib3 -> idna[version=’>=2.0.0’]
requests -> idna[version=’>=2.5,<2.7|>=2.5,<2.8|>=2.5,<2.9|>=2.5,<3’]
idna
urllib3 -> cryptography[version=’>=1.3.4’] -> idna[version=’>=2.1’]
cryptography -> idna[version=’>=2.1’]
requests -> urllib3[version=’>=1.21.1,<1.26,!=1.25.0,!=1.25.1’] -> idna[version=’>=2.0.0’]
pyopenssl -> cryptography[version=’>=2.8’] -> idna[version=’>=2.1’]

Package pysocks conflicts for:
urllib3 -> pysocks[version=’>=1.5.6,<2.0,!=1.5.7’]
requests -> urllib3[version=’>=1.21.1,<1.26,!=1.25.0,!=1.25.1’] -> pysocks[version=’>=1.5.6,<2.0,!=1.5.7’]
pysocks

The command ‘/bin/sh -c wget ht tps://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && chmod +x Miniconda3-latest-Linux-x86_64.sh && bash ./Miniconda3-latest-Linux-x86_64.sh -b -f -p /opt/conda && /opt/conda/bin/conda install -y python=$PYTHON_VERSION numpy pyyaml scipy ipython mkl mkl-include ninja cython typing && /opt/conda/bin/conda install -y -c pytorch magma-cuda100 && /opt/conda/bin/conda clean -ya’ returned a non-zero code: 1

Hello!

Thanks for posting.

I don’t believe this is actually related to any issues with pytorch.

It would appear as though there are some conflicting packages out of all of the dependency packages you are trying to install.

Thank you @seemethere , but isnt this the official pytorch docker build image. can you tell me list of things i could change to make it work. Its also not working on nvidia dgx and my friend had the same troubles