| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| self-hosted-builder/ | 04-Jul-2025 | - | 285 | 194 | ||
| README.md | D | 04-Jul-2025 | 2.1 KiB | 77 | 58 |
README.md
1# Configuring the builder. 2 3## Install prerequisites. 4 5``` 6$ sudo dnf install podman podman-docker jq 7``` 8 9## Add services. 10 11``` 12$ sudo cp self-hosted-builder/*.service /etc/systemd/system/ 13$ sudo systemctl daemon-reload 14``` 15 16## Download qemu-user-static image 17 18``` 19# sudo docker pull docker.io/iiilinuxibmcom/qemu-user-static:6.1.0-1 20``` 21 22## Autostart the x86_64 emulation support. 23 24``` 25$ sudo systemctl enable --now qemu-user-static 26``` 27 28## Rebuild the image 29 30First build s390x builder image `docker.io/pytorch/manylinuxs390x-builder`, 31using following commands: 32 33``` 34$ cd ~ 35$ git clone https://github.com/pytorch/pytorch 36$ cd pytorch 37$ git submodule update --init --recursive 38$ GPU_ARCH_TYPE=cpu-s390x "$(pwd)/.ci/docker/manywheel/build.sh" manylinuxs390x-builder 39$ docker image tag localhost/pytorch/manylinuxs390x-builder docker.io/pytorch/manylinuxs390x-builder:cpu-s390x 40$ docker image save -o ~/manywheel-s390x.tar docker.io/pytorch/manylinuxs390x-builder:cpu-s390x 41``` 42 43Next step is to build `actions-runner` image using: 44 45``` 46$ cd self-hosted-builder 47$ sudo docker build \ 48 --pull \ 49 -f actions-runner.Dockerfile \ 50 -t iiilinuxibmcom/actions-runner.<name> \ 51 . 52``` 53 54If there are failures, ensure that selinux doesn't prevent it from working. 55In worst case, selinux can be disabled with `setenforce 0`. 56 57Now prepare all necessary files for runner registration: 58 59``` 60$ sudo mkdir -p /etc/actions-runner/<name> 61$ sudo chmod 700 /etc/actions-runner/<name> 62$ sudo /bin/cp <github_app_private_key_file> /etc/actions-runner/<name>/key_private.pem 63$ sudo echo <github_app_id> | sudo tee /etc/actions-runner/<name>/appid.env 64$ sudo echo <github_app_install_id> | sudo tee /etc/actions-runner/<name>/installid.env 65$ sudo echo NAME=<worker_name> | sudo tee /etc/actions-runner/<name>/env 66$ sudo echo ORG=<github_org> | sudo tee -a /etc/actions-runner/<name>/env 67$ cd self-hosted-builder 68$ sudo /bin/cp helpers/*.sh /usr/local/bin/ 69$ sudo chmod 755 /usr/local/bin/app_token.sh /usr/local/bin/gh_token_generator.sh 70``` 71 72## Autostart the runner. 73 74``` 75$ sudo systemctl enable --now actions-runner@$NAME 76``` 77