mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Publish current state of s390x builder image to allow reproducing worker setup. Also, if this image gets published to docker repository later, it'd be possible to download published image instead of building it into worker image in https://github.com/pytorch/pytorch/blob/main/.github/scripts/s390x-ci/self-hosted-builder/actions-runner.Dockerfile#L66, which should allow improving restart time at the cost of additional runtime overhead. Compared to first attempt to merge: - default docker repository settings are added to all runners. Changes are mirrored in this PR. - job is moved into separate workflow file. - it's no longer attempted to update limits on s390x. Limits should be properly set up there on the host. And it's not possible to update them from worker since it runs in container. Also, worker container currently doesn't have sudo installed or configured or any systemd running. - github token is now passed once via named pipe instead of environment variable. This should increase security of tokens. Pull Request resolved: https://github.com/pytorch/pytorch/pull/132983 Approved by: https://github.com/huydhn, https://github.com/malfet
59 lines
1.9 KiB
YAML
59 lines
1.9 KiB
YAML
name: Build manywheel docker images for s390x
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
- release/*
|
|
tags:
|
|
# NOTE: Binary build pipelines should only get triggered on release candidate or nightly builds
|
|
# Release candidate tags look like: v1.11.0-rc1
|
|
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
|
|
paths:
|
|
- '.ci/docker/manywheel/*'
|
|
- '.ci/docker/manywheel/build_scripts/*'
|
|
- '.ci/docker/common/*'
|
|
- .github/workflows/build-manywheel-images-s390x.yml
|
|
pull_request:
|
|
paths:
|
|
- '.ci/docker/manywheel/*'
|
|
- '.ci/docker/manywheel/build_scripts/*'
|
|
- '.ci/docker/common/*'
|
|
- .github/workflows/build-manywheel-images-s390x.yml
|
|
|
|
|
|
env:
|
|
DOCKER_REGISTRY: "docker.io"
|
|
DOCKER_BUILDKIT: 1
|
|
WITH_PUSH: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release')) }}
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-docker-cpu-s390x:
|
|
if: github.repository_owner == 'pytorch'
|
|
environment: ${{ (github.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/tags/v')) && 'docker-build' || '' }}
|
|
runs-on: linux.s390x
|
|
env:
|
|
GPU_ARCH_TYPE: cpu-s390x
|
|
steps:
|
|
- name: Checkout PyTorch
|
|
uses: pytorch/pytorch/.github/actions/checkout-pytorch@main
|
|
with:
|
|
submodules: false
|
|
no-sudo: true
|
|
- name: Authenticate if WITH_PUSH
|
|
if: env.WITH_PUSH == 'true'
|
|
env:
|
|
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
|
DOCKER_ID: ${{ secrets.DOCKER_ID }}
|
|
run: |
|
|
if [[ "${WITH_PUSH}" == true ]]; then
|
|
echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_ID}" --password-stdin
|
|
fi
|
|
- name: Build Docker Image
|
|
run: |
|
|
.ci/docker/manywheel/build.sh manylinuxs390x-builder:cpu-s390x
|