Failed to build docker NVidia ODTK container

I am trying to do a training with NVidia ODTK by following the tutorial from here.
But I received an error message, when I run the following command:

docker build -t odtk:latest retinanet-examples/

This is the error message:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>[+] Building 24.6s (7/7) FINISHED
docker:default
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 129B
0.0s
=> [internal] load metadata for nvcr.io/nvidia/pytorch:21.09-py3
1.8s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 158B 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 2.82kB 0.0s
=> [1/3] FROM nvcr.io/nvidia/pytorch:21.09-py3@sha256:ab303284646e417327ae1589b3768e04211669438110efec6c7fccad476b4b18 0.0s
=> CACHED [2/3] COPY . odtk/ 0.0s
=> ERROR [3/3] RUN pip install --no-cache-dir -e odtk/ 22.7s
------
> [3/3] RUN pip install --no-cache-dir -e odtk/:
0.782 Obtaining file:///workspace/odtk
2.824 Collecting apex@ git+https://github.com/NVIDIA/apex
2.824 Cloning https://github.com/NVIDIA/apex to /tmp/pip-install-v3efl3hz/apex_0df28d2b4ed149d1b2e6909802bc4c7f
2.824 Running command git clone -q https://github.com/NVIDIA/apex /tmp/pip-install-v3efl3hz/apex_0df28d2b4ed149d1b2e6909802bc4c7f
5.215 Resolved https://github.com/NVIDIA/apex to commit f3f049246e5bdf6fdddf251ebe6b65dd4ca1ee29
5.215 Running command git submodule update --init --recursive -q
16.95 Installing build dependencies: started
20.08 Installing build dependencies: finished with status 'done'
20.08 Getting requirements to build wheel: started
20.21 Getting requirements to build wheel: finished with status 'error'
20.21 ERROR: Command errored out with exit status 1:
20.21 command: /opt/conda/bin/python3.8 /opt/conda/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpmbgatucf
20.21 cwd: /tmp/pip-install-v3efl3hz/apex_0df28d2b4ed149d1b2e6909802bc4c7f
20.21 Complete output (15 lines):
20.21 Traceback (most recent call last):
20.21 File "/opt/conda/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in <module>
20.21 main()
20.21 File "/opt/conda/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main
20.21 json_out['return_val'] = hook(**hook_input['kwargs'])
20.21 File "/opt/conda/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 117, in get_requires_for_build_wheel
20.21 return hook(config_settings)
20.21 File "/tmp/pip-build-env-qb4_wrf9/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
20.21 return self._get_build_requires(config_settings, requirements=['wheel'])
20.21 File "/tmp/pip-build-env-qb4_wrf9/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
20.21 self.run_setup()
20.21 File "/tmp/pip-build-env-qb4_wrf9/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 311, in run_setup
20.21 exec(code, locals())
20.21 File "<string>", line 5, in <module>
20.21 ModuleNotFoundError: No module named 'packaging'
20.21 ----------------------------------------
20.21 WARNING: Discarding git+https://github.com/NVIDIA/apex. Command errored out with exit status 1: /opt/conda/bin/python3.8 /opt/conda/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpmbgatucf Check the logs for full command output.
20.22 Collecting pycocotools@ git+https://github.com/nvidia/cocoapi.git#subdirectory=PythonAPI
20.22 Cloning https://github.com/nvidia/cocoapi.git to /tmp/pip-install-v3efl3hz/pycocotools_dcd509eec8774a0e8f05148c3dbf810e
20.22 Running command git clone -q https://github.com/nvidia/cocoapi.git /tmp/pip-install-v3efl3hz/pycocotools_dcd509eec8774a0e8f05148c3dbf810e
21.65 Resolved https://github.com/nvidia/cocoapi.git to commit d99cbf3823588ef09a2721655f46e509ebafb3d7
21.99 Requirement already satisfied: torch>=1.0.0a0 in /opt/conda/lib/python3.8/site-packages (from odtk==0.2.6) (1.10.0a0+3fd9dcf)
21.99 Requirement already satisfied: torchvision in /opt/conda/lib/python3.8/site-packages (from odtk==0.2.6) (0.11.0a0)
22.18 ERROR: Could not find a version that satisfies the requirement apex (unavailable) (from odtk) (from versions: 0.9.8dev.linux-i686, 0.9.8.dev0, 0.9.8a0.dev0, 0.9.9.dev0, 0.9.10.dev0)
22.18 ERROR: No matching distribution found for apex (unavailable)
------
Dockerfile:4
--------------------
2 |
3 | COPY . odtk/
4 | >>> RUN pip install --no-cache-dir -e odtk/
5 |
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install --no-cache-dir -e odtk/" did not complete successfully: exit code: 1
</code>
<code>[+] Building 24.6s (7/7) FINISHED docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 129B 0.0s => [internal] load metadata for nvcr.io/nvidia/pytorch:21.09-py3 1.8s => [internal] load .dockerignore 0.0s => => transferring context: 158B 0.0s => [internal] load build context 0.0s => => transferring context: 2.82kB 0.0s => [1/3] FROM nvcr.io/nvidia/pytorch:21.09-py3@sha256:ab303284646e417327ae1589b3768e04211669438110efec6c7fccad476b4b18 0.0s => CACHED [2/3] COPY . odtk/ 0.0s => ERROR [3/3] RUN pip install --no-cache-dir -e odtk/ 22.7s ------ > [3/3] RUN pip install --no-cache-dir -e odtk/: 0.782 Obtaining file:///workspace/odtk 2.824 Collecting apex@ git+https://github.com/NVIDIA/apex 2.824 Cloning https://github.com/NVIDIA/apex to /tmp/pip-install-v3efl3hz/apex_0df28d2b4ed149d1b2e6909802bc4c7f 2.824 Running command git clone -q https://github.com/NVIDIA/apex /tmp/pip-install-v3efl3hz/apex_0df28d2b4ed149d1b2e6909802bc4c7f 5.215 Resolved https://github.com/NVIDIA/apex to commit f3f049246e5bdf6fdddf251ebe6b65dd4ca1ee29 5.215 Running command git submodule update --init --recursive -q 16.95 Installing build dependencies: started 20.08 Installing build dependencies: finished with status 'done' 20.08 Getting requirements to build wheel: started 20.21 Getting requirements to build wheel: finished with status 'error' 20.21 ERROR: Command errored out with exit status 1: 20.21 command: /opt/conda/bin/python3.8 /opt/conda/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpmbgatucf 20.21 cwd: /tmp/pip-install-v3efl3hz/apex_0df28d2b4ed149d1b2e6909802bc4c7f 20.21 Complete output (15 lines): 20.21 Traceback (most recent call last): 20.21 File "/opt/conda/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in <module> 20.21 main() 20.21 File "/opt/conda/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main 20.21 json_out['return_val'] = hook(**hook_input['kwargs']) 20.21 File "/opt/conda/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 117, in get_requires_for_build_wheel 20.21 return hook(config_settings) 20.21 File "/tmp/pip-build-env-qb4_wrf9/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel 20.21 return self._get_build_requires(config_settings, requirements=['wheel']) 20.21 File "/tmp/pip-build-env-qb4_wrf9/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires 20.21 self.run_setup() 20.21 File "/tmp/pip-build-env-qb4_wrf9/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 311, in run_setup 20.21 exec(code, locals()) 20.21 File "<string>", line 5, in <module> 20.21 ModuleNotFoundError: No module named 'packaging' 20.21 ---------------------------------------- 20.21 WARNING: Discarding git+https://github.com/NVIDIA/apex. Command errored out with exit status 1: /opt/conda/bin/python3.8 /opt/conda/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpmbgatucf Check the logs for full command output. 20.22 Collecting pycocotools@ git+https://github.com/nvidia/cocoapi.git#subdirectory=PythonAPI 20.22 Cloning https://github.com/nvidia/cocoapi.git to /tmp/pip-install-v3efl3hz/pycocotools_dcd509eec8774a0e8f05148c3dbf810e 20.22 Running command git clone -q https://github.com/nvidia/cocoapi.git /tmp/pip-install-v3efl3hz/pycocotools_dcd509eec8774a0e8f05148c3dbf810e 21.65 Resolved https://github.com/nvidia/cocoapi.git to commit d99cbf3823588ef09a2721655f46e509ebafb3d7 21.99 Requirement already satisfied: torch>=1.0.0a0 in /opt/conda/lib/python3.8/site-packages (from odtk==0.2.6) (1.10.0a0+3fd9dcf) 21.99 Requirement already satisfied: torchvision in /opt/conda/lib/python3.8/site-packages (from odtk==0.2.6) (0.11.0a0) 22.18 ERROR: Could not find a version that satisfies the requirement apex (unavailable) (from odtk) (from versions: 0.9.8dev.linux-i686, 0.9.8.dev0, 0.9.8a0.dev0, 0.9.9.dev0, 0.9.10.dev0) 22.18 ERROR: No matching distribution found for apex (unavailable) ------ Dockerfile:4 -------------------- 2 | 3 | COPY . odtk/ 4 | >>> RUN pip install --no-cache-dir -e odtk/ 5 | -------------------- ERROR: failed to solve: process "/bin/sh -c pip install --no-cache-dir -e odtk/" did not complete successfully: exit code: 1 </code>
[+] Building 24.6s (7/7) FINISHED                                                                                              
docker:default
=> [internal] load build definition from Dockerfile                                                                                     
0.0s
=> => transferring dockerfile: 129B                                                                                                     
0.0s
=> [internal] load metadata for nvcr.io/nvidia/pytorch:21.09-py3                                                                        
1.8s
=> [internal] load .dockerignore                                                                                                        
0.0s
=> => transferring context: 158B                                                                                                        0.0s
=> [internal] load build context                                                                                                        0.0s
=> => transferring context: 2.82kB                                                                                                      0.0s
=> [1/3] FROM nvcr.io/nvidia/pytorch:21.09-py3@sha256:ab303284646e417327ae1589b3768e04211669438110efec6c7fccad476b4b18                  0.0s
=> CACHED [2/3] COPY . odtk/                                                                                                            0.0s
=> ERROR [3/3] RUN pip install --no-cache-dir -e odtk/                                                                                 22.7s
------                                                                                                                                        
 > [3/3] RUN pip install --no-cache-dir -e odtk/:                                                                                             
0.782 Obtaining file:///workspace/odtk                                                                                                        
2.824 Collecting apex@ git+https://github.com/NVIDIA/apex                                                                                     
2.824   Cloning https://github.com/NVIDIA/apex to /tmp/pip-install-v3efl3hz/apex_0df28d2b4ed149d1b2e6909802bc4c7f                             
2.824   Running command git clone -q https://github.com/NVIDIA/apex /tmp/pip-install-v3efl3hz/apex_0df28d2b4ed149d1b2e6909802bc4c7f           
5.215   Resolved https://github.com/NVIDIA/apex to commit f3f049246e5bdf6fdddf251ebe6b65dd4ca1ee29
5.215   Running command git submodule update --init --recursive -q
16.95   Installing build dependencies: started
20.08   Installing build dependencies: finished with status 'done'
20.08   Getting requirements to build wheel: started
20.21   Getting requirements to build wheel: finished with status 'error'
20.21   ERROR: Command errored out with exit status 1:
20.21    command: /opt/conda/bin/python3.8 /opt/conda/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpmbgatucf
20.21        cwd: /tmp/pip-install-v3efl3hz/apex_0df28d2b4ed149d1b2e6909802bc4c7f
20.21   Complete output (15 lines):
20.21   Traceback (most recent call last):
20.21     File "/opt/conda/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in <module>
20.21       main()
20.21     File "/opt/conda/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main
20.21       json_out['return_val'] = hook(**hook_input['kwargs'])
20.21     File "/opt/conda/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 117, in get_requires_for_build_wheel
20.21       return hook(config_settings)
20.21     File "/tmp/pip-build-env-qb4_wrf9/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
20.21       return self._get_build_requires(config_settings, requirements=['wheel'])
20.21     File "/tmp/pip-build-env-qb4_wrf9/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
20.21       self.run_setup()
20.21     File "/tmp/pip-build-env-qb4_wrf9/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 311, in run_setup
20.21       exec(code, locals())
20.21     File "<string>", line 5, in <module>
20.21   ModuleNotFoundError: No module named 'packaging'
20.21   ----------------------------------------
20.21 WARNING: Discarding git+https://github.com/NVIDIA/apex. Command errored out with exit status 1: /opt/conda/bin/python3.8 /opt/conda/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpmbgatucf Check the logs for full command output.
20.22 Collecting pycocotools@ git+https://github.com/nvidia/cocoapi.git#subdirectory=PythonAPI
20.22   Cloning https://github.com/nvidia/cocoapi.git to /tmp/pip-install-v3efl3hz/pycocotools_dcd509eec8774a0e8f05148c3dbf810e
20.22   Running command git clone -q https://github.com/nvidia/cocoapi.git /tmp/pip-install-v3efl3hz/pycocotools_dcd509eec8774a0e8f05148c3dbf810e
21.65   Resolved https://github.com/nvidia/cocoapi.git to commit d99cbf3823588ef09a2721655f46e509ebafb3d7
21.99 Requirement already satisfied: torch>=1.0.0a0 in /opt/conda/lib/python3.8/site-packages (from odtk==0.2.6) (1.10.0a0+3fd9dcf)
21.99 Requirement already satisfied: torchvision in /opt/conda/lib/python3.8/site-packages (from odtk==0.2.6) (0.11.0a0)
22.18 ERROR: Could not find a version that satisfies the requirement apex (unavailable) (from odtk) (from versions: 0.9.8dev.linux-i686, 0.9.8.dev0, 0.9.8a0.dev0, 0.9.9.dev0, 0.9.10.dev0)
22.18 ERROR: No matching distribution found for apex (unavailable)
------
Dockerfile:4
--------------------
   2 |     
   3 |     COPY . odtk/
   4 | >>> RUN pip install --no-cache-dir -e odtk/
   5 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install --no-cache-dir -e odtk/" did not complete successfully: exit code: 1

Is the same issue described here on NVidia forum, but no solution offered.

I am using Ubuntu 22.04.4 LTS and Docker version 26.1.0, build 9714adc.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật