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

Dockerfile submission error using proxy #50

Closed
Bonum opened this issue Jul 24, 2019 · 6 comments

Comments

@Bonum
Copy link

commented Jul 24, 2019

I am trying to make a submission on Windows with docker settings for proxy:
export "HTTP_PROXY=http://proxy.xxx:8080" and "HTTPS_PROXY=http://proxy.xxx:8080"

AnimalAI-Olympics\examples\submission>docker build --tag=submission .

Only first step was executed (downloaded) successfully :
FROM nvidia/cuda:9.0-cudnn7-runtime-ubuntu16.04
Here is the log:

AnimalAI-Olympics\examples\submission>docker build --tag=submission .
Sending build context to Docker daemon 29.88MB
Step 1/20 : FROM nvidia/cuda:9.0-cudnn7-runtime-ubuntu16.04
---> fa42893c355d
Step 2/20 : RUN apt-get clean && apt-get update && apt-get install -y locales
---> Running in 827ac1f47f87
Err:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 InRelease
Failed to connect to developer.download.nvidia.com port 443: Connection refused
Err:2 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 InRelease
Failed to connect to developer.download.nvidia.com port 443: Connection refused
Err:3 http://archive.ubuntu.com/ubuntu xenial InRelease
Could not connect to archive.ubuntu.com:80 (91.189.88.162). - connect (111: Connection refused) [IP: 91.189.88.162 80]
Err:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.162 80]
Err:5 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.162 80]
Err:6 http://security.ubuntu.com/ubuntu xenial-security InRelease
Could not connect to security.ubuntu.com:80 (91.189.88.24). - connect (111: Connection refused) [IP: 91.189.88.24 80]
Reading package lists...
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease Could not connect to archive.ubuntu.com:80 (91.189.88.162). - connect (111: Connecti
on refused) [IP: 91.189.88.162 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.162 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.162 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease Could not connect to security.ubuntu.com:80 (91.189.88.24). - connect (111
: Connection refused) [IP: 91.189.88.24 80]
W: Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/InRelease Failed to connect to developer.download.nvidia.com port
443: Connection refused
W: Failed to fetch https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/InRelease Failed to connect to developer.download.nvi
dia.com port 443: Connection refused
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
Package locales is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'locales' has no installation candidate
The command '/bin/sh -c apt-get clean && apt-get update && apt-get install -y locales' returned a non-zero code: 100

@beyretb

This comment has been minimized.

Copy link
Owner

commented Jul 24, 2019

Hi,

This is a docker related issue, you clearly seem to have connectivity problems as your build isn't connecting to any of the repositories, which might be related to your proxy setup. We don't have the resources to support custom configurations unfortunately, I can only recommend asking the docker community for help on this.

@Bonum

This comment has been minimized.

Copy link
Author

commented Jul 24, 2019

Hi,

I agree that this is a docker related issue and you don't have to support custom configurations.

Just to mention:

  • My docker has connection :
    Step 1/20 : FROM nvidia/cuda:9.0-cudnn7-runtime-ubuntu16.04 ---> fa42893c355d
    was downloaded successfully
    Something wrong is going at
    Step 2/20 : RUN apt-get clean && apt-get update && apt-get install -y locales
    Actually I split this in three steps and the first passed.

  • Without a docker I cannot participate in your competition.

@beyretb

This comment has been minimized.

Copy link
Owner

commented Jul 24, 2019

I agree that this is a docker related issue and you don't have to support custom configurations

We are more than happy to provide all the help we can when we are able to reproduce an issue, which is not the case here unfortunately

My docker has connection

It has some connection but I think your proxy does not work for some crucial services such as the ubuntu and nvidia repositories.

Not sure if this can help you but did you try this ?

@krisives

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2019

Actually I split this in three steps and the first passed.

That's because apt clean doesn't do anything related to networking. apt-get update will contact the repositories configured for your Docker container and apt install will fetch packages from the repositories.

It fails because:

Err:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 InRelease
Failed to connect to developer.download.nvidia.com port 443: Connection refused

Your HTTP proxy isn't allowing HTTPS connections to developer.download.nvidia.com on port 443.

It also appears your proxy is not configured correctly for regular HTTP connections either:

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.162 80]

Without a docker I cannot participate in your competition.

Docker really has very little to do with this problem. Your HTTP proxy is the problem. You'll probably find the same problem with any program/command that attempts to use your proxy:

export http_proxy=http://proxy.xxx:8080/
curl https://github.com
@Bonum

This comment has been minimized.

Copy link
Author

commented Jul 25, 2019

Hello Benjamin and Kristopher,

Thank you for your effort to resolve my problem.

In fact my docker is properly configured with proxy settings and has connection to outside, but running
the first line of Dockerfile caused for some reason problems with http_proxy settings.

The solution is to add also INSIDE Dockerfile after the first line:

ENV http_proxy "http://proxy.xxx:8080"
ENV https_proxy "http://proxy.xxx:8080"

Now "docker build --tag=submission . " was executed without a problem ( it took a while to install all dependencies).

Please have in mind that you set

ENV http_proxy "" etc. before

# YOUR COMMANDS GO HERE
RUN pip install animalai-train

which caused a problem.
Deleting http_proxy settings should be moved after that.

Regards,
Bonum

@beyretb

This comment has been minimized.

Copy link
Owner

commented Jul 28, 2019

glad you could find a fix! closing this issue

@beyretb beyretb closed this Jul 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.