Reputation: 107
I am using this guide to install docker on an ubuntu server; below is a list of commands that succeed:
sudo apt-get install apt-transport-https ca-certificates curl gnupg
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
apt-cache madison docker-ce
sudo apt-get install docker-ce=5:20.10.5~3-0~ubuntu-focal docker-ce-cli=5:20.10.5~3-0~ubuntu-focal containerd.io
sudo docker run hello-world
and the following command ends with an exception which I could not figure out. I am just appending the last few lines of the output, i.e. there several more lines like 'Pull complete' which for simplicity are not pasted.
$ sudo docker build . --rm -t unet_industrial:latest
...
64b042356f2f: Pull complete
cc20fc4ac4a7: Pull complete
Running command git clone -q git://github.com/NVIDIA/dllogger /tmp/pip-install-qk44vpx2/dllogger_fe6a3cc31bd747099e88bb9266898680
fatal: unable to connect to github.com:
github.com[0: 140.82.121.3]: errno=Connection timed out
WARNING: Discarding git+git://github.com/NVIDIA/dllogger#egg=dllogger. Command errored out with exit status 128: git clone -q git://github.com/NVIDIA/dllogger /tmp/pip-install-qk44vpx2/dllogger_fe6a3cc31bd747099e88bb9266898680 Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement dllogger (unavailable)
ERROR: No matching distribution found for dllogger (unavailable)
In addition, I am posting here the Dockerfile which ought to be changed because it was ascertained that the git clone command works upon using https:// in lieu of git://
ARG FROM_IMAGE_NAME=nvcr.io/nvidia/tensorflow:20.06-tf1-py3
FROM ${FROM_IMAGE_NAME}
WORKDIR /opt
COPY requirements.txt /opt/requirements_unet_tf_industrial.txt
RUN python -m pip --no-cache-dir --no-cache install --upgrade pip && \
pip --no-cache-dir --no-cache install -r /opt/requirements_unet_tf_industrial.txt
ENV TF_EXTRA_PTXAS_OPTIONS="-sw200428197=true"
ADD . /workspace/unet_industrial
WORKDIR /workspace/unet_industrial
Upvotes: 5
Views: 3594
Reputation: 4200
I don't think it's proxy related as you're able to pull apt packages and execute curl commands. Perhaps it's related to SSH (perhaps not configured) - can you try cloning repo using HTTPS instead e.g. git clone -q https://github.com/NVIDIA/dllogger.git /tmp/pip-install-qk44vpx2/dllogger_fe6a3cc31bd747099e88bb9266898680
let me know how it goes...
Upvotes: 2
Reputation: 31634
This is not related to install of docker on ubuntu, but related to your projects' Dockerfile build.
From your error log, it looks there are next in your Dockerfile:
pip install git+git://github.com/NVIDIA/dllogger
When pip install from a github repo, it will first try to download the source code with:
git clone -q git://github.com/NVIDIA/dllogger
Unfortunately, when docker do build it will also start a build container, but looks your build container can't visit github.
A probable reason is you are behind a proxy, then you need add proxy when build like next:
$ docker build --build-arg http_proxy=your_http_proxy --build-arg https_proxy=your_https_proxy -t unet_industrial:latest .
Upvotes: 1