Cannot build docker container for deepstream-test3

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version nvcr.io/nvidia/deepstream:6.1.1-devel
• NVIDIA GPU Driver Version (valid for GPU only) 515
• Issue Type( questions, new requirements, bugs) Bug
• How to reproduce the issue ?

I want to deploy a graph to a server, and for this I want to build the docker image. So far, I am running the graph composer from the nvcr.io/nvidia/deepstream:6.1.1-devel container, and can successfully launch the samples, including the deepstream-test3 graph.

I have made some small changes to the deepstream-test3 graph (mainly just changing the input URIs to actual RTSP streams), and wanted to build the docker image so I can deploy it on a server with access to those RTSP streams.

However, I get several errors when building the docker image, see below:

root@desktop-ubuntu:/opt/nvidia/deepstream/deepstream-6.1/reference_graphs/deepstream-test3# container_builder -c ds_test3_container_builder_dgpu.yaml -d /opt/nvidia/graph-composer/config/target_x86_64.yaml 
2022-10-28 13:43:54,946 - ContainerBuilder.container_builder.docker_manager.docker_manager - INFO - Auto selected base image: nvcr.io/nvidia/deepstream:6.1.1-samples
2022-10-28 13:43:54,947 - ContainerBuilder.container_builder.docker_manager.docker_manager - INFO - start building stage image deepstream_test3_dgpu
2022-10-28 13:43:54,964 - ContainerBuilder.container_builder.docker_templ.docker_templ_maker - INFO - writing docker content to /root/.cache/container_builder/.dockerfile_1743
2022-10-28 13:43:54,964 - ContainerBuilder.container_builder.docker_manager.docker_manager - INFO - docker file /root/.cache/container_builder/.dockerfile_1743 generated
2022-10-28 13:43:54,964 - ContainerBuilder.container_builder.docker_manager.docker_manager - INFO - start preparing work folder: /root/.cache/container_builder/.workfolder_1743
2022-10-28 13:43:54,964 - ContainerBuilder.container_builder.docker_manager.docker_workfolder - INFO - copying local files to work folder
2022-10-28 13:43:54,966 - ContainerBuilder.container_builder.docker_manager.docker_workfolder - INFO - Work folder: /root/.cache/container_builder/.workfolder_1743/final_image is ready
2022-10-28 13:43:56,736 - Registry - INFO - Installing graph ...
2022-10-28 13:43:56,762 - Registry - INFO - 
Requested target configuration: 
  arch: x86_64 os: linux distribution: ubuntu_20.04 cuda: 11.6 cudnn: 8.2.2.26 tensorrt: 8.2.3.0 deepstream: 6.1 vpi: 2.0.7 

Selected extension variants: 
StandardExtension 
  Version: 2.0.0 Variant: arch: x86_64 os: linux distribution: ubuntu_20.04 cuda: 11.6 
MultimediaExtension 
  Version: 2.0.0 Variant: arch: x86_64 os: linux distribution: ubuntu_20.04 
NvDsInterfaceExt 
  Version: 1.0.0 Variant: arch: x86_64 os: linux distribution: ubuntu_20.04 deepstream: 6.1 
NvDsBaseExt 
  Version: 1.0.0 Variant: arch: x86_64 os: linux distribution: ubuntu_20.04 deepstream: 6.1 
NvDsSourceExt 
  Version: 1.0.0 Variant: arch: x86_64 os: linux distribution: ubuntu_20.04 deepstream: 6.1 
NvDsMuxDemuxExt 
  Version: 1.0.0 Variant: arch: x86_64 os: linux distribution: ubuntu_20.04 deepstream: 6.1 
NvDsOutputSinkExt 
  Version: 1.0.0 Variant: arch: x86_64 os: linux distribution: ubuntu_20.04 deepstream: 6.1 
NvDsVisualizationExt 
  Version: 1.0.2 Variant: arch: x86_64 os: linux distribution: ubuntu_20.04 deepstream: 6.1.1 
NvDsInferenceExt 
  Version: 1.0.0 Variant: arch: x86_64 os: linux distribution: ubuntu_20.04 deepstream: 6.1 
NvDsSampleModelsExt 
  Version: 1.0.0 Variant: arch: x86_64 os: linux distribution: ubuntu_20.04 deepstream: 6.1 

2022-10-28 13:46:00,738 - ContainerBuilder.container_builder.docker_manager.docker_manager - INFO - work folder: /root/.cache/container_builder/.workfolder_1743 is ready
2022-10-28 13:46:00,738 - ContainerBuilder.container_builder.docker_manager.docker_manager - INFO - start build docker file /root/.cache/container_builder/.dockerfile_1743
Traceback (most recent call last):
  File "urllib3/connectionpool.py", line 598, in urlopen
  File "urllib3/connectionpool.py", line 357, in _make_request
  File "http/client.py", line 1256, in request
  File "http/client.py", line 1302, in _send_request
  File "http/client.py", line 1251, in endheaders
  File "http/client.py", line 1011, in _send_output
  File "http/client.py", line 951, in send
  File "docker/transport/unixconn.py", line 30, in connect
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "requests/adapters.py", line 430, in send
  File "urllib3/connectionpool.py", line 638, in urlopen
  File "urllib3/util/retry.py", line 357, in increment
  File "urllib3/packages/six.py", line 685, in reraise
  File "urllib3/connectionpool.py", line 598, in urlopen
  File "urllib3/connectionpool.py", line 357, in _make_request
  File "http/client.py", line 1256, in request
  File "http/client.py", line 1302, in _send_request
  File "http/client.py", line 1251, in endheaders
  File "http/client.py", line 1011, in _send_output
  File "http/client.py", line 951, in send
  File "docker/transport/unixconn.py", line 30, in connect
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "docker/api/client.py", line 214, in _retrieve_server_version
  File "docker/api/daemon.py", line 181, in version
  File "docker/utils/decorators.py", line 46, in inner
  File "docker/api/client.py", line 237, in _get
  File "requests/sessions.py", line 521, in get
  File "requests/sessions.py", line 508, in request
  File "requests/sessions.py", line 618, in send
  File "requests/adapters.py", line 490, in send
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "container_builder/cli/cli.py", line 59, in <module>
  File "container_builder/cli/cli.py", line 53, in main
  File "container_builder/cli/container_builder_runtime.py", line 44, in build
  File "container_builder/docker_manager/docker_manager.py", line 457, in build_main_yaml
  File "container_builder/docker_manager/docker_manager.py", line 527, in build_stage_image
  File "container_builder/docker_manager/docker_builder.py", line 119, in build_from
  File "container_builder/docker_manager/docker_builder.py", line 67, in _internal_build
  File "container_builder/docker_manager/docker_builder.py", line 48, in _ensure_client
  File "container_builder/docker_manager/docker_builder.py", line 38, in _create_client
  File "docker/client.py", line 96, in from_env
  File "docker/client.py", line 45, in __init__
  File "docker/api/client.py", line 197, in __init__
  File "docker/api/client.py", line 221, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
[1743] Failed to execute script 'cli' due to unhandled exception!

Any idea what’s going on? I have tried multiple times, but the error persists.

Adding -v /var/run/docker.sock:/var/run/docker.sock to the docker command seems to have solved the issue. (makes sense, there is no docker daemon inside the docker container…)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.