Skip to content

Docker Build error #240

Open
Open

Description

@MyraBaba

Hi,

I am trying to build Docker from file with FROM nvcr.io/nvidia/tensorrt:21.02-py3 due to my Nvidia driver is old 460.xx.

It alwyas gives timeout 443 error when downloading torch ie:

docker build - < Dockerfile
Sending build context to Docker daemon 4.096kB
Step 1/11 : FROM nvcr.io/nvidia/tensorrt:21.02-py3
---> 7dbb30c41311
Step 2/11 : ENV DEBIAN_FRONTEND=noninteractive
---> Using cache
---> a059e98f4263
Step 3/11 : ARG USERNAME=user
---> Using cache
---> 78aefacc9a44
Step 4/11 : ARG WORKDIR=/workspace/ByteTrack
---> Using cache
---> b7bd86b7196d
Step 5/11 : RUN apt-get update && apt-get install -y automake autoconf libpng-dev nano python3-pip curl zip unzip libtool swig zlib1g-dev pkg-config python3-mock libpython3-dev libpython3-all-dev g++ gcc cmake make pciutils cpio gosu wget libgtk-3-dev libxtst-dev sudo apt-transport-https build-essential gnupg git xz-utils vim libva-drm2 libva-x11-2 vainfo libva-wayland2 libva-glx2 libva-dev libdrm-dev xorg xorg-dev protobuf-compiler openbox libx11-dev libgl1-mesa-glx libgl1-mesa-dev libtbb2 libtbb-dev libopenblas-dev libopenmpi-dev && sed -i 's/# set linenumbers/set linenumbers/g' /etc/nanorc && apt clean && rm -rf /var/lib/apt/lists/*
---> Using cache
---> 86020628100a
Step 6/11 : RUN git clone https://github.com/ifzhang/ByteTrack && cd ByteTrack && git checkout 3434c5e && mkdir -p YOLOX_outputs/yolox_x_mix_det/track_vis && sed -i 's/torch>=1.7/torch==1.9.1+cu111/g' requirements.txt && sed -i 's/torchvision==0.10.0/torchvision==0.10.1+cu111/g' requirements.txt && sed -i "s/'cuda'/0/g" tools/demo_track.py && pip3 install pip --upgrade && pip3 install -r requirements.txt -f https://download.pytorch.org/whl/torch_stable.html && python3 setup.py develop && pip3 install cython && pip3 install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI' && pip3 install cython_bbox gdown && ldconfig && pip cache purge
---> Running in 3f2a108bdb33
Cloning into 'ByteTrack'...
Note: switching to '3434c5e8bc6a5ae8ad530528ba8d9a431967f237'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 3434c5e Update README.md
Requirement already satisfied: pip in /usr/local/lib/python3.8/dist-packages (21.0)
Collecting pip
Downloading pip-22.1.2-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.0
Uninstalling pip-21.0:
Successfully uninstalled pip-21.0
Successfully installed pip-22.1.2
Looking in links: https://download.pytorch.org/whl/torch_stable.html
Requirement already satisfied: numpy in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 2)) (1.19.5)
Collecting torch==1.9.1+cu111
Downloading https://download.pytorch.org/whl/cu111/torch-1.9.1%2Bcu111-cp38-cp38-linux_x86_64.whl (2041.3 MB)
^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B

0  tulpar  1:0  0:zsh-  1:ssh*  2:ssh  15:39:36  19-Jul-22  tulpar.local
╰─➤ cd
candidate = func() |
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/resolution/resolvelib/factory.py", line 215, in _make_candidate_from_lin|
k |
self._link_candidate_cache[link] = LinkCandidate( |
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 291, in init |
super().init( |
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 161, in init |
self.dist = self._prepare() |
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 230, in _prepare |
dist = self._prepare_distribution() |
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 302, in _prepare_distribution|
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True) |
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/operations/prepare.py", line 428, in prepare_linked_requirement |
return self._prepare_linked_requirement(req, parallel_builds) |
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/operations/prepare.py", line 473, in _prepare_linked_requirement |
local_file = unpack_url( |
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/operations/prepare.py", line 155, in unpack_url |
file = get_http_url( |
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/operations/prepare.py", line 96, in get_http_url |
from_path, content_type = download(link, temp_dir.path) |
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/network/download.py", line 146, in call |
for chunk in chunks: |
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/progress_bars.py", line 53, in _rich_progress_bar |
for chunk in iterable: |
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/network/utils.py", line 63, in response_chunks |
for chunk in response.raw.stream( |
File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/urllib3/response.py", line 573, in stream |
data = self.read(amt=amt, decode_content=decode_content) |
File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/urllib3/response.py", line 538, in read |
raise IncompleteRead(self._fp_bytes_read, self.length_remaining) |
File "/usr/lib/python3.8/contextlib.py", line 131, in exit |
self.gen.throw(type, value, traceback) |
File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/urllib3/response.py", line 440, in _error_catcher |
raise ReadTimeoutError(self._pool, None, "Read timed out.") |
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='download.pytorch.org', port=443): Read timed out. |
The command '/bin/sh -c git clone https://github.com/ifzhang/ByteTrack && cd ByteTrack && git checkout 3434c5e|
8d9a431967f237 && mkdir -p YOLOX_outputs/yolox_x_mix_det/track_vis && sed -i 's/torch>=1.7/torch==1.9.1+cu111/g' requirements.txt|
&& sed -i 's/torchvision==0.10.0/torchvision==0.10.1+cu111/g' requirements.txt && sed -i "s/'cuda'/0/g" tools/demo_track.py &&|
pip3 install pip --upgrade && pip3 install -r requirements.txt -f https://download.pytorch.org/whl/torch_stable.html && python3 |
setup.py develop && pip3 install cython && pip3 install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI' |
&& pip3 install cython_bbox gdown && ldconfig && pip cache purge' returned a non-zero code: 2

how I can solve this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions