Hi,
I have a jetson nano.
And I want to run my docker/run.sh on boot
I tried doing it on a script but didnt succeed
Thanks
Hi,
I have a jetson nano.
And I want to run my docker/run.sh on boot
I tried doing it on a script but didnt succeed
Thanks
Hi @antonin.morcrette, if you look at how JetBot does it (https://github.com/NVIDIA-AI-IOT/jetbot/blob/45f3c7824a48a6a89c0058cbfff00e493617f256/docker/jupyter/enable.sh#L14), you should be able to add --restart always
to the sudo docker run ...
command inside docker/run.sh script. Then once you start the container, it should automatically restart after reboots.
For more info, see Docker - what does `docker run --restart always` actually do? - Stack Overflow
Alternatively, you may create a systemd service that starts the container for you at boot-up, but I think that Docker can do this for you already.
Hi thanks for your answers.
But it does not seems to work properly or i dont see if it works,
I added the restart always but when I reboot, the docker does not restart automatically,
@antonin.morcrette if you run sudo docker ps -a
after reboot, do you see the container running? You may need to re-attach to it with sudo docker attach
. You may need to play around with the docker container settings when you start it, and this (or if you were to make a systemd service to start it) isn’t specific to Jetson.