-
Notifications
You must be signed in to change notification settings - Fork 537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run ollama container via systemd on system startup #805
Comments
Hey @elvismdev , when you transition to deployment, I would just start using the My suggestion was going to be to use the docker restart/persistence flags or docker-compose instead, and yea that's what the thread concluded with. The updates to jetson-containers and jetson-ai-lab are using docker-compose. It is for managing deployments like this better. I have not gotten to the reboot/persistence part yet though. |
@dusty-nv Thanks for the response! I've tried using the direct docker run -d \
--runtime nvidia \
--restart unless-stopped \
--network host \
--shm-size=8g \
--volume /tmp/argus_socket:/tmp/argus_socket \
--volume /etc/enctune.conf:/etc/enctune.conf \
--volume /etc/nv_tegra_release:/etc/nv_tegra_release \
--volume /tmp/nv_jetson_model:/tmp/nv_jetson_model \
--volume /var/run/dbus:/var/run/dbus \
--volume /var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume /home/jetson/jetson-containers/data:/data \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro \
--device /dev/snd \
--device /dev/bus/usb \
--device /dev/i2c-0 \
--device /dev/i2c-1 \
--device /dev/i2c-2 \
--device /dev/i2c-4 \
--device /dev/i2c-5 \
--device /dev/i2c-7 \
-v /run/jtop.sock:/run/jtop.sock \
--name ollama \
$(autotag ollama) However, the container keeps restarting in a loop. The interesting part is that when I run Could there be something in the container's configuration or environment that's causing it to exit when run with the direct |
Alternatively, rather than using the container, you can use the official Ollama installer to install Ollama natively on Jetson. |
I'm trying to run the ollama container automatically on system startup using systemd on my Jetson Orin Nano. While I can start the container manually using:
jetson-containers run --name ollama $(autotag ollama)
I've tried creating a systemd service, but I'm encountering issues. The service keeps restarting or fails to start properly. I've tried several approaches:
Current issues:
Could you provide guidance on the correct way to set this up as a systemd service that starts on boot?
Environment:
Logs:
When running manually (works):
When running as service (fails):
Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: