dockerfile name in yml #296
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ppc64le-build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - ciflow/ppc64le/* | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }} | |
| cancel-in-progress: true | |
| jobs: | |
| linux-ppc64le-docker-image-build: | |
| name: Build docker image for ppc64le | |
| runs-on: linux.ppc64le | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Build Docker image for ppc64le | |
| run: | | |
| docker build -f .github/workflows/Dockerfile.ppc64le -t pytorch-ppc64le:ubi9.3 . | |
| - name: Debug .git directory inside container | |
| run: | | |
| docker run --rm -v "$(pwd):/workspace/pytorch" pytorch-ppc64le:ubi9.3 bash -c "ls -la /workspace/pytorch/.git || echo '.git directory not found'" | |
| - name: Debug ownership inside container | |
| run: | | |
| docker run --rm -v "$(pwd):/workspace/pytorch" pytorch-ppc64le:ubi9.3 bash -c " | |
| ls -ld /workspace/pytorch; | |
| ls -ld /workspace/pytorch/.git; | |
| whoami" | |
| - name: Run Docker container and execute build script | |
| run: | | |
| docker run --rm -u $(id -u):$(id -g) -v "/opt/runner/work/pytorch/pytorch:/workspace/pytorch/pytorch" pytorch-ppc64le:ubi9.3 bash -c " | |
| export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 && | |
| git -C /workspace/pytorch submodule deinit --all --force && | |
| git -C /workspace/pytorch submodule update --init --recursive --force && | |
| /ppc64le-build.sh" | |
| - name: Archive ppc64le artifacts into zip | |
| run: | | |
| set -e | |
| if [ -d "dist" ]; then | |
| rm -f artifacts.zip # Remove old zip if it exists | |
| zip -9 -r artifacts.zip dist/ | |
| else | |
| echo "Warning: dist directory not found, skipping artifact creation." | |
| fi | |
| - name: Store PyTorch Build Artifacts for ppc64le | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test | |
| retention-days: 14 | |
| if-no-files-found: error | |
| path: artifacts.zip | |
| linux-ubi-9-3-cpu-ppc64le-build: | |
| name: linux-ubi9-3-cpu-ppc64le | |
| uses: ./.github/workflows/_linux-build.yml | |
| needs: linux-ppc64le-docker-image-build | |
| with: | |
| build-environment: linux-ppc64le-binary-manywheel | |
| docker-image-name: pytorch-ppc64le:ubi9.3 | |
| runner: linux.ppc64le # Example runner | |