Closed jrb-cobot closed 1 year ago
Hi @jrb-cobot ,
Try to add on your docker the jtop user.
sudo usermod -a -G jtop $USER
Hello all, the correct answer was to add --group-add $JTOP_GID
to my docker run
command. The command didn't work with --group-add jtop
for whatever reason. You can get the JTOP_GID
by running getent group jtop | awk -F: '{print $3}'
.
Thank you! I add your fix to the documentation
Updated https://rnext.it/jetson_stats/docker.html
Let me know if is correct for you as well
Hi, @rbonghi I just trying to make the container starts after reboot the Jetson-nano, the current configuration is:
docker run --detach --restart always --group-add $JTOP_GID -it -v /home/dev01/Documents/code/:/home/ -v
/run/jtop.sock:/run/jtop.sock my-image:v60 bash
However I getting the following error:
level=error msg="failed to start container" container=f3bb2343d9dd4ff00ab146bfd0f5f88d222749dd7803ac2375410f78cd1ae280 error="failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting \"/run/jtop.sock\" to rootfs at \"/run/jtop.sock\": mount /run/jtop.sock:/run/jtop.sock (via /proc/self/fd/7), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type"
Any help will be appreciated, Thanks.
Describe the bug
I have made a non-root user in my container. Jtop does not run. When running the container as root, it works fine.
In my Dockerfile, before making the user, I have this line which runs as root:
RUN python3 -m pip install -U jetson-stats
. This is the behavior I want--install as root, run as non-root.To Reproduce
docker run ...
docker run --user root ...
Jtop works as normal.Expected behavior
After installation, jtop should run without
sudo
, just as in the non-containerized case.Board
Output from
jetson_release -v
: