The script:
#!/bin/bash
export PATH="$PATH:$HOME/.local/bin/"
clearml-agent daemon --detached --create-queue --queue holly-gpu0 gpu-24gb gpu-12gb gpu-8gb --gpus 0
clearml-agent daemon --queue task_services --detached --services-mode --cpu-only
please share your .service
content too as there are a lot of way to "spawn" in systemd
# Contents of /etc/systemd/system/clearml-spin-up-agent.service
[Unit]
Description=ClearML Spin up agent service
After=network.target
[Service]
Type=simple
Restart=always
User=clearml
WorkingDirectory=/home/clearml
ExecStart=/home/clearml/spin_up_clearml_agent.sh
[Install]
WantedBy=multi-user.target
Hey @<1721336583027691520:profile|ImmenseKoala11> , I have done something similar. My setup is quite a bit different since I had to handle some other internal stuff, but the general idea is the same as yours.
My startup script does a simple clearml-agent daemon --queue <my_queue>
, where <my_queue>
is a queue I created manually from the webapp. I don't need to change it often, so my agents simply connect to the existing queue. Also I don't have the --detatched
flag, I don't think you need it.
I also needed to handle stuff when the agents shuts down, so I had a separate script that does clearml-agent daemon --stop
to be executed at ExecStop
Hope it helps!