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:
<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.