Docker_dli_run error

i have jetson nano 4gb

and i using image [jetson-nano-4gb-jp441-sd-card-image]

i try to run Docker container with following command

echo "sudo docker run --runtime nvidia -it --rm --network host \
    --volume ~/nvdli-data:/nvdli-nano/data \
    --device /dev/video0 \
    nvcr.io/nvidia/dli/dli-nano-ai:v2.0.1-r32.4.4" > docker_dli_run.sh
chmod +x docker_dli_run.sh
./docker_dli_run.sh

i get following message in terminal:
docker: invalid reference format.
See ‘docker run --help’.
./docker_dli_run.sh: line 4: nvcr.io/nvidia/dli/dli-nano-ai:v2.0.1-r32.4.4: No such file or directory

could you help me?

without saving .sh i run in terminal directly as

sudo docker run --runtime nvidia -it --rm --network host
–volume ~/nvdli-data:/nvdli-nano/data
–device /dev/video0
nvcr.io/nvidia/dli/dli-nano-ai:v2.0.1-r32.4.4

and the output is as shown in screenshot below

Hi @rajkumarsaswamy, it appears OK when you ran the command directly - in your screenshot, it is downloading the container from NGC. It should then run it for you when the download is complete.

I’m not sure why your docker_dli_run.sh script didn’t run, because I copy/pasted it and it worked here…

Perhaps you could open it in a file editor from your Nano (like nano or vi) and enter it there to rule out any issue with Windows/Linux line endings or something like that.

2 Likes

The problem is that the ‘\’ is not being recognized inside a xxx.sh bash script.
You have to copy/paste into the bash script file being edited using nano, then remove all of the ‘\’ (along with returns and line feeds) so the command is on one very long line. At that point, you can run the command over and over from the .sh file. Here is the final file, no line endings until the line is finished:
#-------
#!/bin/bash
sudo docker run --runtime nvidia -it --rm --network host --volume ~/nvdli-data:/nvdli-nano/data --volume /tmp/argus_socket:/tmp/argus_socket --device /dev/video0 nvcr.io/nvidia/dli/dli-nano-ai:v2.0.1-r32.4.4
#-------

(you may also be able to use it as is by doubling the \, i.e. \\)

3 Likes

Thanks @wade.maxfield, we have since updated the DLI course instructions as they accidentally contained a trailing space character after the \ which was causing it to not be recognized by bash properly.

also, sometimes the command line interpreter swallows the “\” as it is considered an escape character when inside a script……

image001.png

1 Like

Make sure you’re following the lattes version of the docker by checking the out to date tutorial! https://courses.nvidia.com/courses/course-v1:DLI+S-RX-02+V2/courseware/

Ahha, I got it. I get that error because i forgot to plug my WIFI adapter

So, after I plug it, I get this screenshot and download some file