Docker build error

username: VIGNESHinZONE
cooked: <p>I tried building the pytorch/docker/pytorch/dockerfile using two ways</p>
<ol>
<li>in the docker/pytorch/ directory</li>
</ol>
<p>docker build -t pytorch_build:1.0 .</p>
<p>i got the following error<br>
Package numpy conflicts for:<br>
numpy<br>
scipy → numpy[version=‘&gt;=1.11.3,&lt;2.0a0|&gt;=1.14.6,&lt;2.0a0|&gt;=1.15.1,&lt;2.0a0|&gt;=1.9.3,&lt;2.0a0’]</p>
<p>Package wheel conflicts for:<br>
pip → wheel<br>
python=3.8 → pip → wheel<br>
wheel</p>
<p>Package pycparser conflicts for:<br>
cffi → pycparser<br>
pycparser<br>
cryptography → cffi[version=‘&gt;=1.8’] → pycparser</p>
<p>The command ‘/bin/sh -c curl -o ~/miniconda.sh <a href="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh" rel="noopener nofollow ugc">https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh</a> &amp;&amp;      chmod +x ~/miniconda.sh &amp;&amp;      ~/miniconda.sh -b -p /opt/conda &amp;&amp;      rm ~/miniconda.sh &amp;&amp;      /opt/conda/bin/conda install -y python=$PYTHON_VERSION numpy pyyaml scipy ipython mkl mkl-include ninja cython typing &amp;&amp;      /opt/conda/bin/conda install -y -c pytorch magma-cuda100 &amp;&amp;      /opt/conda/bin/conda clean -ya’ returned a non-zero code: 1</p>
<ol start="2">
<li>using the Makefile</li>
</ol>
<p>i used             $ sudo make -f docker.Makefile</p>
<p>got the following error:</p>
<h2><a name="error-conda-11-run-curl-v-o-minicondash-o-https-repocontinuum-iominicondaminiconda3-latest-linux-x86_64sh-chmod-x-minicondash-minicondash-b-p-optconda-38s-canceled-submodule-update-23-copy-39s-1" class="anchor" href="#error-conda-11-run-curl-v-o-minicondash-o-https-repocontinuum-iominicondaminiconda3-latest-linux-x86_64sh-chmod-x-minicondash-minicondash-b-p-optconda-38s-canceled-submodule-update-23-copy-39s-1"></a>=&gt; ERROR [conda 1/1] RUN curl -v -o ~/miniconda.sh -O  https:// repo.continuum .io/miniconda/Miniconda3-latest-Linux-x86_64.sh  &amp;&amp;     chmod +x ~/miniconda.sh &amp;&amp;     ~/miniconda.sh -b -p /opt/conda   3.8s<br>
=&gt; CANCELED [submodule-update 2/3] COPY . .                                                                                                                                                           3.9s</h2>
<blockquote>
<p>[conda 1/1] RUN curl -v -o ~/miniconda.sh -O  <a href="https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh" rel="noopener nofollow ugc">https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh</a>  &amp;&amp;     chmod +x ~/miniconda.sh &amp;&amp;     ~/miniconda.sh -b -p /opt/conda &amp;&amp;     rm ~/miniconda.sh &amp;&amp;     /opt/conda/bin/conda install -y python=${PYTHON_VERSION} conda-build pyyaml numpy ipython&amp;&amp;     /opt/conda/bin/conda clean -ya:<br>
<span class="hashtag-raw">#11</span> 0.590   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current<br>
<span class="hashtag-raw">#11</span> 0.590                                  Dload  Upload   Total   Spent    Left  Speed<br>
0     0    0     0    0     0      0      0 --:–:-- --:–:-- --:–:--     0*   Trying 104.18.200.79…<br>
<span class="hashtag-raw">#11</span> 0.843 * TCP_NODELAY set<br>
<span class="hashtag-raw">#11</span> 0.871 * Connected to repo.continuum .io (104.18.200.79) port 443 (<span class="hashtag-raw">#0</span>)<br>
<span class="hashtag-raw">#11</span> 0.875 * ALPN, offering h2<br>
<span class="hashtag-raw">#11</span> 0.875 * ALPN, offering http/1.1<br>
<span class="hashtag-raw">#11</span> 0.894 * successfully set certificate verify locations:<br>
<span class="hashtag-raw">#11</span> 0.894 *   CAfile: /etc/ssl/certs/ca-certificates.crt<br>
<span class="hashtag-raw">#11</span> 0.894   CApath: /etc/ssl/certs<br>
<span class="hashtag-raw">#11</span> 0.895 } [5 bytes data]<br>
<span class="hashtag-raw">#11</span> 0.895 * TLSv1.3 (OUT), TLS handshake, Client hello (1):<br>
<span class="hashtag-raw">#11</span> 0.895 } [512 bytes data]<br>
<span class="hashtag-raw">#11</span> 0.930 * TLSv1.3 (IN), TLS handshake, Server hello (2):<br>
<span class="hashtag-raw">#11</span> 0.930 { [104 bytes data]<br>
<span class="hashtag-raw">#11</span> 0.930 * TLSv1.2 (IN), TLS handshake, Certificate (11):<br>
<span class="hashtag-raw">#11</span> 0.930 { [2206 bytes data]<br>
<span class="hashtag-raw">#11</span> 0.932 * TLSv1.2 (IN), TLS handshake, Server key exchange (12):<br>
<span class="hashtag-raw">#11</span> 0.932 { [115 bytes data]<br>
<span class="hashtag-raw">#11</span> 0.932 * TLSv1.2 (IN), TLS handshake, Server finished (14):<br>
<span class="hashtag-raw">#11</span> 0.932 { [4 bytes data]<br>
<span class="hashtag-raw">#11</span> 0.932 * TLSv1.2 (OUT), TLS handshake, Client key exchange (16):<br>
<span class="hashtag-raw">#11</span> 0.932 } [37 bytes data]<br>
<span class="hashtag-raw">#11</span> 0.933 * TLSv1.2 (OUT), TLS change cipher, Client hello (1):<br>
<span class="hashtag-raw">#11</span> 0.933 } [1 bytes data]<br>
<span class="hashtag-raw">#11</span> 0.933 * TLSv1.2 (OUT), TLS handshake, Finished (20):<br>
<span class="hashtag-raw">#11</span> 0.933 } [16 bytes data]<br>
<span class="hashtag-raw">#11</span> 0.961 * TLSv1.2 (IN), TLS handshake, Finished (20):<br>
<span class="hashtag-raw">#11</span> 0.961 { [16 bytes data]<br>
<span class="hashtag-raw">#11</span> 0.961 * SSL connection using TLSv1.2 / ECDHE-ECDSA-CHACHA20-POLY1305<br>
<span class="hashtag-raw">#11</span> 0.961 * ALPN, server accepted to use h2<br>
<span class="hashtag-raw">#11</span> 0.961 * Server certificate:<br>
<span class="hashtag-raw">#11</span> 0.961 *  subject: C=US; ST=CA; L=San Francisco; O=Cloudflare, Inc.; CN=sni.cloudflaressl .com<br>
<span class="hashtag-raw">#11</span> 0.961 *  start date: Apr  6 00:00:00 2020 GMT<br>
<span class="hashtag-raw">#11</span> 0.961 *  expire date: Oct  9 12:00:00 2020 GMT<br>
<span class="hashtag-raw">#11</span> 0.962 *  subjectAltName: host repo.continuum.i o matched cert’s “*.continuum.io”<br>
<span class="hashtag-raw">#11</span> 0.962 *  issuer: C=US; ST=CA; L=San Francisco; O=CloudFlare, Inc.; CN=CloudFlare Inc ECC CA-2<br>
<span class="hashtag-raw">#11</span> 0.962 *  SSL certificate verify ok.<br>
<span class="hashtag-raw">#11</span> 0.962 * Using HTTP2, server supports multi-use<br>
<span class="hashtag-raw">#11</span> 0.962 * Connection state changed (HTTP/2 confirmed)<br>
<span class="hashtag-raw">#11</span> 0.962 * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0<br>
<span class="hashtag-raw">#11</span> 0.962 } [5 bytes data]<br>
<span class="hashtag-raw">#11</span> 0.962 * Using Stream ID: 1 (easy handle 0x5594f99cf580)<br>
<span class="hashtag-raw">#11</span> 0.962 } [5 bytes data]<br>
<span class="hashtag-raw">#11</span> 0.963 &gt; GET /miniconda/Miniconda3-latest-Linux-x86_64.sh HTTP/2<br>
<span class="hashtag-raw">#11</span> 0.963 &gt; Host: repo.continuum.i o<br>
<span class="hashtag-raw">#11</span> 0.963 &gt; User-Agent: curl/7.58.0<br>
<span class="hashtag-raw">#11</span> 0.963 &gt; Accept: <em>/</em><br>
<span class="hashtag-raw">#11</span> 0.963 &gt;<br>
<span class="hashtag-raw">#11</span> 0.963 { [5 bytes data]<br>
<span class="hashtag-raw">#11</span> 0.963 * Connection state changed (MAX_CONCURRENT_STREAMS updated)!<br>
<span class="hashtag-raw">#11</span> 0.963 } [5 bytes data]<br>
<span class="hashtag-raw">#11</span> 1.022 &lt; HTTP/2 301<br>
<span class="hashtag-raw">#11</span> 1.022 &lt; date: Thu, 23 Apr 2020 03:42:56 GMT<br>
<span class="hashtag-raw">#11</span> 1.022 &lt; cache-control: max-age=3600<br>
<span class="hashtag-raw">#11</span> 1.022 &lt; expires: Thu, 23 Apr 2020 04:42:56 GMT<br>
<span class="hashtag-raw">#11</span> 1.022 &lt; location: https:/ /repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh<br>
<span class="hashtag-raw">#11</span> 1.022 &lt; expect-ct: max-age=604800, report-uri=“https:/ /report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”<br>
<span class="hashtag-raw">#11</span> 1.022 &lt; server: cloudflare<br>
<span class="hashtag-raw">#11</span> 1.022 &lt; cf-ray: 588493d40fa9df63-BOM<br>
<span class="hashtag-raw">#11</span> 1.022 &lt; cf-request-id: 0246bab8800000df6320900200000001<br>
<span class="hashtag-raw">#11</span> 1.022 &lt;<br>
<span class="hashtag-raw">#11</span> 1.022 { [0 bytes data]<br>
0     0    0     0    0     0      0      0 --:–:-- --:–:-- --:–:--     0<br>
<span class="hashtag-raw">#11</span> 1.022 * Connection <span class="hashtag-raw">#0</span> to host repo.continuum .io left intact<br>
<span class="hashtag-raw">#11</span> 1.037 /bin/sh: 1: /opt/conda/bin/conda: not found</p>
</blockquote>
<hr>
<p>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  &amp;&amp;     chmod +x ~/miniconda.sh &amp;&amp;     ~/miniconda.sh -b -p /opt/conda &amp;&amp;     rm ~/miniconda.sh &amp;&amp;     /opt/conda/bin/conda install -y python=${PYTHON_VERSION} conda-build pyyaml numpy ipython&amp;&amp;     /opt/conda/bin/conda clean -ya]: runc did not terminate sucessfully<br>
docker.Makefile:32: recipe for target ‘devel-image’ failed<br>
make: *** [devel-image] Error 1</p>
<p>Im using ubuntu 18.04.4 with geforce 940mx<br>
docker version Docker version 19.03.8<br>
and nvidia-docker2 installed alongside</p>

username: ptrblck
cooked: <p>Could you try to use <code>wget</code> instead of <code>curl</code> or <code>curl -Ssl</code>, as the download of miniconda seems to fail?</p>

username: VIGNESHinZONE
cooked: <p><strong>here is the dockerfile which i had used</strong> <div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/a/6/a6f590efc597446b7afd7c98bde11fd84c6cb743.png" data-download-href="https://discuss.pytorch.org/uploads/default/a6f590efc597446b7afd7c98bde11fd84c6cb743" title="Screenshot from 2020-04-23 15-26-00"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/a/6/a6f590efc597446b7afd7c98bde11fd84c6cb743_2_690x388.png" alt="Screenshot from 2020-04-23 15-26-00" data-base62-sha1="nOZnKSsu57AmbPPRjSVKb9XHpkf" width="690" height="388" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/a/6/a6f590efc597446b7afd7c98bde11fd84c6cb743_2_690x388.png, https://discuss.pytorch.org/uploads/default/optimized/3X/a/6/a6f590efc597446b7afd7c98bde11fd84c6cb743_2_1035x582.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/a/6/a6f590efc597446b7afd7c98bde11fd84c6cb743_2_1380x776.png 2x" data-dominant-color="262526"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot from 2020-04-23 15-26-00</span><span class="informations">1920×1080 226 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p><strong>im still getting and error seems to be in package conflicts</strong></p>
<p>Package cryptography conflicts for:<br>
cryptography<br>
urllib3 → cryptography[version=‘&gt;=1.3.4’]<br>
urllib3 → pyopenssl[version=‘&gt;=0.14’] → cryptography[version=‘&gt;=1.9|&gt;=2.1.4|&gt;=2.2.1|&gt;=2.8’]<br>
conda[version=‘&gt;=4.8.2’] → pyopenssl[version=‘&gt;=16.2.0’] → cryptography[version=‘&gt;=1.9|&gt;=2.1.4|&gt;=2.2.1|&gt;=2.8’]<br>
requests → urllib3[version=‘&gt;=1.21.1,&lt;1.26,!=1.25.0,!=1.25.1’] → cryptography[version=‘&gt;=1.3.4’]<br>
pyopenssl → cryptography[version=‘&gt;=1.9|&gt;=2.1.4|&gt;=2.2.1|&gt;=2.8’]</p>
<p>Package pycosat conflicts for:<br>
pycosat<br>
conda[version=‘&gt;=4.8.2’] → pycosat[version=‘&gt;=0.6.3’]</p>
<p>Package idna conflicts for:<br>
conda[version=‘&gt;=4.8.2’] → requests[version=‘&gt;=2.18.4,&lt;3’] → idna[version=‘&gt;=2.5,&lt;2.7|&gt;=2.5,&lt;2.8|&gt;=2.5,&lt;2.9|&gt;=2.5,&lt;3’]<br>
urllib3 → idna[version=‘&gt;=2.0.0’]<br>
requests → idna[version=‘&gt;=2.5,&lt;2.7|&gt;=2.5,&lt;2.8|&gt;=2.5,&lt;2.9|&gt;=2.5,&lt;3’]<br>
idna<br>
urllib3 → cryptography[version=‘&gt;=1.3.4’] → idna[version=‘&gt;=2.1’]<br>
cryptography → idna[version=‘&gt;=2.1’]<br>
requests → urllib3[version=‘&gt;=1.21.1,&lt;1.26,!=1.25.0,!=1.25.1’] → idna[version=‘&gt;=2.0.0’]<br>
pyopenssl → cryptography[version=‘&gt;=2.8’] → idna[version=‘&gt;=2.1’]</p>
<p>Package pysocks conflicts for:<br>
urllib3 → pysocks[version=‘&gt;=1.5.6,&lt;2.0,!=1.5.7’]<br>
requests → urllib3[version=‘&gt;=1.21.1,&lt;1.26,!=1.25.0,!=1.25.1’] → pysocks[version=‘&gt;=1.5.6,&lt;2.0,!=1.5.7’]<br>
pysocks</p>
<p>The command ‘/bin/sh -c wget ht tps://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh &amp;&amp;     chmod +x Miniconda3-latest-Linux-x86_64.sh &amp;&amp;      bash ./Miniconda3-latest-Linux-x86_64.sh -b -f -p /opt/conda &amp;&amp;      /opt/conda/bin/conda install -y python=$PYTHON_VERSION numpy pyyaml scipy ipython mkl mkl-include ninja cython typing &amp;&amp;      /opt/conda/bin/conda install -y -c pytorch magma-cuda100 &amp;&amp;      /opt/conda/bin/conda clean -ya’ returned a non-zero code: 1</p>

username: seemethere
cooked: <p>Hello!</p>
<p>Thanks for posting.</p>
<p>I don’t believe this is actually related to any issues with pytorch.</p>
<p>It would appear as though there are some conflicting packages out of all of the dependency packages you are trying to install.</p>

username: VIGNESHinZONE
cooked: <p>Thank you <a class="mention" href="/u/seemethere">@seemethere</a> , 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</p>