Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to build docker #4

Closed
kuixu opened this issue Jul 16, 2021 · 16 comments
Closed

failed to build docker #4

kuixu opened this issue Jul 16, 2021 · 16 comments

Comments

@kuixu
Copy link

kuixu commented Jul 16, 2021

Wonderful repo !!! Thanks so much for the Alphafold2 Team. And I have a problem in building alphafold docker. Error information is shown below. It seems that the related cuda resource is not found. Thanks all.

$ docker build -f docker/Dockerfile -t alphafold .

Sending build context to Docker daemon  12.69MB
Step 1/19 : ARG CUDA=11.0
Step 2/19 : FROM nvidia/cuda:${CUDA}-base
 ---> 2ec708416bb8
Step 3/19 : ARG CUDA
 ---> Using cache
 ---> 076eace7d488
Step 4/19 : SHELL ["/bin/bash", "-c"]
 ---> Using cache
 ---> b57b88dc2b9a
Step 5/19 : RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y       build-essential       cmake       cuda-command-line-tools-${CUDA/./-}       git       hmmer       kalign       tzdata       wget     && rm -rf /var/lib/apt/lists/*
 ---> Running in 52e953f25c2b
...
...


E: Failed to fetch https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64/by-hash/SHA256/27b2dbb347d54776dec155d98e1eefbde6c10a3fd1295007c3e836cfd9b98522  404  Not Found [IP: 58.205.210.80 443]
E: Some index files failed to download. They have been ignored, or old ones used instead.
@tjrana
Copy link

tjrana commented Jul 16, 2021

I think this might be a location issue, rather than an issue with Docker.

It should download the following: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-command-line-tools-11-0_11.0.3-1_amd64.deb. However, your network is trying to use the developer.download.nvidia.cn domain. Maybe it's not available in China?

Perhaps you can try the following:

  1. On your host computer, obtain the IPv4 address for the domain developer.download.nvidia.com by using ping developer.download.nvidia.com (use ctrl+c to stop sending pings). For example, the IP address can be 152.195.19.142.
  2. Open your host machine's hosts file. For Linux/Unix-like operating systems, it should be /etc/hosts.
  3. Add the following line to the bottom of the hosts file (replace the IP address with the one obtained from the pings):
152.195.19.142       developer.download.nvidia.cn

This will tell your computer to translate the developer.download.nvidia.cn domain to the 152.195.19.142 IP address. Note that you may need escalated privileges to modify that file.

@wangyanmin123
Copy link

Alphafold2 Team
Hello Alphafold2 Team, 1>I'm using docker build -f docker/Dockerfile -t alphafold. According to your method, ping developer.download.nvidia.com and the IP obtained by adding /etc/hosts still reports an error, and every time you ping developer. Download.nvidia.com gets different ips, please help,Thank you

docker build -f docker/Dockerfile -t alphafold .
Sending build context to Docker daemon 13.04MB
Step 1/19 : ARG CUDA=11.0
Step 2/19 : FROM nvidia/cuda:${CUDA}-base
---> 2ec708416bb8
Step 3/19 : ARG CUDA
---> Using cache
---> a1f524bee0b4
Step 4/19 : SHELL ["/bin/bash", "-c"]
---> Using cache
---> 09dc16b21719
Step 5/19 : RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake cuda-command-line-tools-${CUDA/./-} git
hmmer kalign tzdata wget && rm -rf /var/lib/apt/lists/* ---> Running in 2433b949ee79
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Ign:2 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64 InRelease
Get:4 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64 Release [697 B]
Get:5 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64 Release.gpg [836 B]
Ign:6 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64 Packages
Ign:6 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64 Packages
Ign:6 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64 Packages
Err:6 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64 Packages
404 Not Found [IP: 124.132.138.69 443]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [782 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
Get:13 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [930 kB]
Get:14 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [27.6 kB]
Get:15 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [368 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [32.0 kB]
Get:18 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1367 kB]
Get:19 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [416 kB]
Get:20 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1053 kB]
Get:21 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [2668 B]
Get:22 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [6303 B]
Fetched 18.4 MB in 1min 44s (176 kB/s)
Reading package lists...
E: Failed to fetch https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64/by-hash/SHA256/27b2dbb347d54776dec155d98e1eefbde6c10a3fd1295007c3e836cfd9b98522
404 Not Found [IP: 124.132.138.69 443]E: Some index files failed to download. They have been ignored, or old ones used instead.

[root@fat03 alphafold]# ping developer.download.nvidia.com
PING developer.download.nvidia.com.zengslb.com (192.254.94.202) 56(84) bytes of data.
64 bytes from 192.254.94.202 (192.254.94.202): icmp_seq=1 ttl=53 time=46.0 ms
64 bytes from 192.254.94.202 (192.254.94.202): icmp_seq=2 ttl=53 time=45.7 ms
64 bytes from 192.254.94.202 (192.254.94.202): icmp_seq=3 ttl=53 time=45.9 ms
^C
--- developer.download.nvidia.com.zengslb.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 45.774/45.906/46.036/0.205 ms
[root@fat03 alphafold]# vim /etc/hosts
[root@fat03 alphafold]# ping developer.download.nvidia.com
PING developer.download.nvidia.com.zengslb.com (45.43.32.210) 56(84) bytes of data.
64 bytes from 45.43.32.210 (45.43.32.210): icmp_seq=1 ttl=53 time=46.8 ms
64 bytes from 45.43.32.210 (45.43.32.210): icmp_seq=2 ttl=53 time=46.7 ms
^C
--- developer.download.nvidia.com.zengslb.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 46.759/46.786/46.813/0.027 ms
[root@fat03 alphafold]# vim /etc/hosts
[root@fat03 alphafold]# vim /etc/hosts
[root@fat03 alphafold]# ping developer.download.nvidia.com
PING developer.download.nvidia.com.zengslb.com (129.227.48.133) 56(84) bytes of data.
64 bytes from 129.227.48.133 (129.227.48.133): icmp_seq=1 ttl=45 time=72.4 ms
64 bytes from 129.227.48.133 (129.227.48.133): icmp_seq=2 ttl=45 time=73.6 ms

I use docker pull fanxuezhe/alphafold_test
The download is also wrong
[root@fat03 alphafold]# docker pull fanxuezhe/alphafold_test
Using default tag: latest
Error response from daemon: manifest for fanxuezhe/alphafold_test:latest not found: manifest unknown: manifest unknown

@truatpasteurdotfr
Copy link

ping developer.download.nvidia.com and you get reply from developer.download.nvidia.com.zengslb.com ?
from home in France:

$ host developer.download.nvidia.com
developer.download.nvidia.com is an alias for developer.download.nvidia.com.global.ogslb.com.
developer.download.nvidia.com.global.ogslb.com is an alias for cs500.wpc.phicdn.net.
cs500.wpc.phicdn.net has address 152.199.20.126

If your access to nvidia.com is filtered, there is not much anyone can do to help you :(

@truatpasteurdotfr
Copy link

OTOH, I could run a github action to build the docker image at ghcr.io/truatpasteurdotfr/alphafold:main.

@ToHanwei
Copy link

I am from China and have the same problem. Has anyone solved this yet?

@1874Mercury
Copy link

I met the same problem = =

@kuixu
Copy link
Author

kuixu commented Jul 18, 2021

Here is the no docker version: https://github.com/kuixu/alphafold

@FizzerYu
Copy link

Try this:
Modify the Dockerfile like this if you are in China:

.................  # some command

RUN echo deb https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64 / | tee /etc/apt/sources.list.d/cuda.list    # HERE! Add this before apt-get update

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
.................  # some command

And you may also unable to access the github depository. So you can modify the website of https://github.com/soedinglab/hh-suite.git to https://github.saobby.my.eu.org.cnpmjs.org/soedinglab/hh-suite.git

@meecle
Copy link

meecle commented Jul 24, 2021

docker build —add-host “developer.download.nvidia.com:152.195.19.142 -f docker/Dockerfile -t alphafold .

@gaorongchao
Copy link

Try this:
Modify the Dockerfile like this if you are in China:

.................  # some command

RUN echo deb https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64 / | tee /etc/apt/sources.list.d/cuda.list    # HERE! Add this before apt-get update

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
.................  # some command

And you may also unable to access the github depository. So you can modify the website of https://github.com/soedinglab/hh-suite.git to https://github.saobby.my.eu.org.cnpmjs.org/soedinglab/hh-suite.git

This Work for me in shanghai China, Thanks!

@nzhou26
Copy link

nzhou26 commented Jul 29, 2021

Try this:
Modify the Dockerfile like this if you are in China:

.................  # some command

RUN echo deb https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64 / | tee /etc/apt/sources.list.d/cuda.list    # HERE! Add this before apt-get update

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
.................  # some command

And you may also unable to access the github depository. So you can modify the website of https://github.com/soedinglab/hh-suite.git to https://github.saobby.my.eu.org.cnpmjs.org/soedinglab/hh-suite.git

I'm in China and changed the github address according to your comment. However, I still recieved this git error:

Step 7/20 : RUN git clone --branch v3.3.0 https://github.saobby.my.eu.org.cnpmjs.org/soedinglab/hh-suite.git /tmp/hh-suite && mkdir /tmp/hh-suite/build
---> Running in a02cbbee030d
Cloning into '/tmp/hh-suite'...
error: RPC failed; curl 56 GnuTLS recv error (-9): Error decoding the received TLS packet.
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

@FizzerYu
Copy link

Try this:
Modify the Dockerfile like this if you are in China:

.................  # some command

RUN echo deb https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64 / | tee /etc/apt/sources.list.d/cuda.list    # HERE! Add this before apt-get update

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
.................  # some command

And you may also unable to access the github depository. So you can modify the website of https://github.com/soedinglab/hh-suite.git to https://github.saobby.my.eu.org.cnpmjs.org/soedinglab/hh-suite.git

I'm in China and changed the github address according to your comment. However, I still recieved this git error:

Step 7/20 : RUN git clone --branch v3.3.0 https://github.saobby.my.eu.org.cnpmjs.org/soedinglab/hh-suite.git /tmp/hh-suite && mkdir /tmp/hh-suite/build
---> Running in a02cbbee030d
Cloning into '/tmp/hh-suite'...
error: RPC failed; curl 56 GnuTLS recv error (-9): Error decoding the received TLS packet.
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

You can clone this depository manually to test the setting of your computer / network.
Or do not replace this website.

@nzhou26
Copy link

nzhou26 commented Jul 30, 2021

Try this:
Modify the Dockerfile like this if you are in China:

.................  # some command

RUN echo deb https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64 / | tee /etc/apt/sources.list.d/cuda.list    # HERE! Add this before apt-get update

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
.................  # some command

And you may also unable to access the github depository. So you can modify the website of https://github.com/soedinglab/hh-suite.git to https://github.saobby.my.eu.org.cnpmjs.org/soedinglab/hh-suite.git

I'm in China and changed the github address according to your comment. However, I still recieved this git error:

Step 7/20 : RUN git clone --branch v3.3.0 https://github.saobby.my.eu.org.cnpmjs.org/soedinglab/hh-suite.git /tmp/hh-suite && mkdir /tmp/hh-suite/build
---> Running in a02cbbee030d
Cloning into '/tmp/hh-suite'...
error: RPC failed; curl 56 GnuTLS recv error (-9): Error decoding the received TLS packet.
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

You can clone this depository manually to test the setting of your computer / network.
Or do not replace this website.

I tried manually clone the repo. With the .cnpmjs.org address, the cloning is working but the download speed is very slow. Without the .cnpmjs.org address, downloading preocess won't be started.
I'm wondering if there's a method that I can copy the repo to the building docker image, so the cloning process won't be needed.

@FizzerYu
Copy link

Try this:
Modify the Dockerfile like this if you are in China:

.................  # some command

RUN echo deb https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64 / | tee /etc/apt/sources.list.d/cuda.list    # HERE! Add this before apt-get update

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
.................  # some command

And you may also unable to access the github depository. So you can modify the website of https://github.com/soedinglab/hh-suite.git to https://github.saobby.my.eu.org.cnpmjs.org/soedinglab/hh-suite.git

I'm in China and changed the github address according to your comment. However, I still recieved this git error:

Step 7/20 : RUN git clone --branch v3.3.0 https://github.saobby.my.eu.org.cnpmjs.org/soedinglab/hh-suite.git /tmp/hh-suite && mkdir /tmp/hh-suite/build
---> Running in a02cbbee030d
Cloning into '/tmp/hh-suite'...
error: RPC failed; curl 56 GnuTLS recv error (-9): Error decoding the received TLS packet.
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

You can clone this depository manually to test the setting of your computer / network.
Or do not replace this website.

I tried manually clone the repo. With the .cnpmjs.org address, the cloning is working but the download speed is very slow. Without the .cnpmjs.org address, downloading preocess won't be started.
I'm wondering if there's a method that I can copy the repo to the building docker image, so the cloning process won't be needed.

Of course you can. Just add some command on Dockerfile. You may use COPY command.

@elliothe
Copy link

elliothe commented Aug 4, 2021

Have the same issue, any updates?

@gaorongchao
Copy link

https://github.saobby.my.eu.org.cnpmjs.org//soedinglab/hh-suite.git work fine in shanghai china. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests