Docker container runtime issue

Hello,

I am trying to make a custom docker image for the mpv video player application on jetson nano.

Here is the docker file which built the image…
Dockerfile (3.0 KB)

When I run as follows,

docker run --rm --privileged --runtime=nvidia -e DISPLAY=unix$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /dev:/dev -v /run:/run -v /etc/machine-id:/etc/machine-id --ipc=host --device /dev/dri --group-add video mpv-nvmpi-nvv4l2dec
docker: Error response from daemon: OCI runtime create failed: json: cannot unmarshal object into Go struct field Process.capabilities of type string: unknown.

Hi @rreddy78, does it work if you remove the FROM docker.io/arm64v8/ubuntu:bionic statement from your Dockerfile? Also, is the version of L4T that you are running indeed L4T R32.5.1? You can check this with cat /etc/nv_tegra_release

Can you also check that you can run the l4t-base container as expected with this command?

sudo docker run -it --rm --net=host --runtime nvidia  nvcr.io/nvidia/l4t-base:r32.5.1

Yes.

cat /etc/nv_tegra_release# R32 (release), REVISION: 5.1, GCID: 26202423, BOARD: t210ref, EABI: aarch64, DATE: Fri Feb 19 16:45:52 UTC 2021

sudo docker run -it --rm --net=host --runtime nvidia nvcr.io/nvidia/l4t-base:r32.5.1
[sudo] password for rreddy78:
Unable to find image ‘nvcr.io/nvidia/l4t-base:r32.5.1’ locally

docker: Error response from daemon: manifest for nvcr.io/nvidia/l4t-base:r32.5.1 not found: manifest unknown: manifest unknown.
See ‘docker run --help’.

Initially I didnt have the nvcr.io line and it built correctly. So for some reason its unable to find the nvcr

Woops, sorry I should have said nvcr.io/nvidia/l4t-base:r32.5.0 instead.

L4T R32.5.1 uses the same l4t-base container as R32.5.0, because there weren’t changes to the BSP between those releases of L4T. So try nvcr.io/nvidia/l4t-base:r32.5.0 instead (even if you are on R32.5.1 in this case). You would also want to change this to r32.5.0 in your Dockerfile.

Yes. indeed this time it downloads correctly, but there is still an error as follows

sudo docker run -it --rm --net=host --runtime nvidia nvcr.io/nvidia/l4t-base:r32.5.0
docker: Error response from daemon: OCI runtime create failed: flag provided but not defined: -console-socket: unknown.

Also one more Qn: Do I or do i not need the FROM docker.io/arm64v8/ubuntu:bionic line ?

If i remove the --runtime=nvidia then it fails with missing libraries

docker run --rm --privileged -e DISPLAY=unix$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /dev:/dev -v /run:/run -v /etc/machine-id:/etc/machine-id --ipc=host --device /dev/dri --group-add video mpv-nvmpi-nvv4l2dec
/usr/bin/mpv: error while loading shared libraries: libnvbuf_utils.so.1.0.0: cannot open shared object file: No such file or directory.

You don’t need that line. You should just have FROM nvcr.io/nvidia/l4t-base:r32.5.0

It seems there is something corrupted or messed up with your docker runtimes. Usually the easiest / most sure-fire way to fix this would be to reflash your SD card. If you don’t want to do that, you can try uninstalling/re-installing the nvidia-container packages:

sudo dpkg-query -l | grep nvidia
ii  libnvidia-container-tools                     0.9.0~beta.1                                     arm64        NVIDIA container runtime library (command-line tools)
ii  libnvidia-container0:arm64                    0.9.0~beta.1                                     arm64        NVIDIA container runtime library
ii  nvidia-container-csv-cuda                     10.2.89-1                                        arm64        Jetpack CUDA CSV file
ii  nvidia-container-csv-cudnn                    8.0.0.180-1+cuda10.2                             arm64        Jetpack CUDNN CSV file
ii  nvidia-container-csv-tensorrt                 7.1.3.0-1+cuda10.2                               arm64        Jetpack TensorRT CSV file
ii  nvidia-container-csv-visionworks              1.6.0.501                                        arm64        Jetpack VisionWorks CSV file
ii  nvidia-container-runtime                      3.1.0-1                                          arm64        NVIDIA container runtime
ii  nvidia-container-toolkit                      1.0.1-1                                          arm64        NVIDIA container runtime hook
ii  nvidia-docker2     

Thanks for the suggestion. Reinstalling did not solve it. Also I see errors in dockerd for the same reason.
What exactly does -console-socket unknown means here in this context ?

rreddy78@jetson-nano:~$ sudo systemctl status docker.service 
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: enabled)
   Active: active (running) since Sat 2021-03-27 08:55:44 IST; 4min 32s ago
     Docs: https://docs.docker.com
 Main PID: 10989 (dockerd)
    Tasks: 25
   CGroup: /system.slice/docker.service
           └─10989 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Mar 27 08:55:44 jetson-nano systemd[1]: Started Docker Application Container Engine.
Mar 27 08:55:45 jetson-nano dockerd[10989]: time="2021-03-27T08:55:45.084708892+05:30" level=error msg="stream copy error: reading from a closed fifo"
Mar 27 08:55:45 jetson-nano dockerd[10989]: time="2021-03-27T08:55:45.169028188+05:30" level=error msg="6fd85380a816a522f5735a49fb5d0540709c803c57addbf21dadc4523640f14
Mar 27 08:55:45 jetson-nano dockerd[10989]: time="2021-03-27T08:55:45.194686837+05:30" level=error msg="Handler for POST /v1.40/containers/6fd85380a816a522f5735a49fb5d
Mar 27 08:55:50 jetson-nano dockerd[10989]: time="2021-03-27T08:55:50.714210147+05:30" level=error msg="stream copy error: reading from a closed fifo"
Mar 27 08:55:50 jetson-nano dockerd[10989]: time="2021-03-27T08:55:50.799201937+05:30" level=error msg="5820be743b074e8ab4970b1e7d331f71092a43d3924b922db50e399eabc2537
Mar 27 08:55:50 jetson-nano dockerd[10989]: time="2021-03-27T08:55:50.823934967+05:30" level=error msg="Handler for POST /v1.40/containers/5820be743b074e8ab4970b1e7d33
Mar 27 08:56:17 jetson-nano dockerd[10989]: time="2021-03-27T08:56:17.141412383+05:30" level=error msg="stream copy error: reading from a closed fifo"
Mar 27 08:56:17 jetson-nano dockerd[10989]: time="2021-03-27T08:56:17.221597031+05:30" level=error msg="a8b8aac49527c7a88a4cc63fd593010c5cef4abcc917790f58e0f01c82b6716
Mar 27 08:56:17 jetson-nano dockerd[10989]: time="2021-03-27T08:56:17.263620751+05:30" level=error msg="Handler for POST /v1.40/containers/a8b8aac49527c7a88a4cc63fd593

When I remove the -it flag there is a different error:

sudo docker run --rm --net=host --runtime nvidia nvcr.io/nvidia/l4t-base:r32.5.0
docker: Error response from daemon: OCI runtime create failed: json: cannot unmarshal object into Go struct field Process.capabilities of type string: unknown.

Hi @rreddy78, I’m not sure what that error means, I haven’t seen it before. At this point I recommend backing up your work and re-flashing your SD card with a fresh JetPack image.