mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Mark stop actions as "may fail". Container is expected to stop on it's own in normal case. Remove "may fail" mark from token generation steps. Pull Request resolved: https://github.com/pytorch/pytorch/pull/145840 Approved by: https://github.com/huydhn
28 lines
1.2 KiB
Desktop File
28 lines
1.2 KiB
Desktop File
[Unit]
|
|
Description=Self-Hosted IBM Z Github Actions Runner
|
|
Wants=qemu-user-static
|
|
After=qemu-user-static
|
|
StartLimitIntervalSec=0
|
|
|
|
[Service]
|
|
Type=simple
|
|
Restart=always
|
|
ExecStartPre=-/usr/bin/docker rm --force actions-runner.%i
|
|
ExecStartPre=/usr/local/bin/gh_token_generator.sh /etc/actions-runner/%i/appid.env /etc/actions-runner/%i/installid.env /etc/actions-runner/%i/key_private.pem /etc/actions-runner/%i/ghtoken.env
|
|
ExecStartPre=/usr/local/bin/gh_cat_token.sh /etc/actions-runner/%i/ghtoken.env /etc/actions-runner/%i/ghtoken.socket
|
|
ExecStart=/usr/bin/docker run \
|
|
--env-file=/etc/actions-runner/%i/env \
|
|
--volume /etc/actions-runner/%i/ghtoken.socket:/run/runner_secret \
|
|
--init \
|
|
--interactive \
|
|
--name=actions-runner.%i \
|
|
--rm \
|
|
--privileged \
|
|
iiilinuxibmcom/actions-runner.%i
|
|
ExecStop=-/bin/sh -c "docker exec actions-runner.%i kill -INT -- -1"
|
|
ExecStop=-/bin/sh -c "docker wait actions-runner.%i"
|
|
ExecStop=-/bin/sh -c "docker rm actions-runner.%i"
|
|
ExecStop=-/usr/bin/env rm -f /etc/actions-runner/%i/ghtoken.env /etc/actions-runner/%i/ghtoken.socket
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|