|
| 1 | +name: Update PyTorch Templates |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches-ignore: |
| 6 | + - main |
| 7 | + paths: |
| 8 | + - "official-templates/pytorch/**" |
| 9 | + pull_request: |
| 10 | + paths: |
| 11 | + - "official-templates/pytorch/**" |
| 12 | + workflow_dispatch: |
| 13 | + inputs: |
| 14 | + specific_template: |
| 15 | + description: "Specific template to update (leave empty to update all)" |
| 16 | + required: false |
| 17 | + type: string |
| 18 | + |
| 19 | +jobs: |
| 20 | + update-templates: |
| 21 | + runs-on: ubuntu-latest-public-m |
| 22 | + strategy: |
| 23 | + fail-fast: false |
| 24 | + matrix: |
| 25 | + include: |
| 26 | + # Map PyTorch variants to template IDs |
| 27 | + # CUDA variants |
| 28 | + - target: 210-py310-cuda1180-devel-ubuntu2204 |
| 29 | + template_id: runpod-torch-v21 |
| 30 | + # Commented out for testing |
| 31 | + # - target: 240-py311-cuda1241-devel-ubuntu2204 |
| 32 | + # template_id: runpod-torch-v240 |
| 33 | + # - target: 220-py310-cuda1211-devel-ubuntu2204 |
| 34 | + # template_id: runpod-torch-v220 |
| 35 | + # - target: 211-py310-cuda1211-devel-ubuntu2204 |
| 36 | + # template_id: runpod-torch-v211 |
| 37 | + # - target: 201-py310-cuda1180-devel-ubuntu2204 |
| 38 | + # template_id: runpod-torch |
| 39 | + # - target: 1131-py38-cuda1171-devel-ubuntu2204 |
| 40 | + # template_id: runpod-torch-v1 |
| 41 | + # # ROCM variants |
| 42 | + # - target: 240-py310-rocm610-ubuntu2204 |
| 43 | + # template_id: runpod-torch-v240-rocm61 |
| 44 | + # - target: 201-py310-rocm57-ubuntu2204 |
| 45 | + # template_id: runpod-torch-v201-rocm57 |
| 46 | + # - target: 201-py39-rocm61-ubuntu2004 |
| 47 | + # template_id: runpod-torch-v201-rocm61 |
| 48 | + # - target: 201-py38-rocm56-ubuntu2004 |
| 49 | + # template_id: runpod-torch-v201-rocm56 |
| 50 | + # - target: 211-py39-rocm60-ubuntu2004 |
| 51 | + # template_id: runpod-torch-v211-rocm60 |
| 52 | + # - target: 212-py310-rocm602-ubuntu2204 |
| 53 | + # template_id: runpod-torch-v212-rocm602 |
| 54 | + # - target: 212-py310-rocm61-ubuntu2204 |
| 55 | + # template_id: runpod-torch-v212-rocm61 |
| 56 | + |
| 57 | + steps: |
| 58 | + - name: Checkout repository |
| 59 | + uses: actions/checkout@v4 |
| 60 | + |
| 61 | + - name: Skip if specific template is set and doesn't match |
| 62 | + id: check_template |
| 63 | + run: | |
| 64 | + if [[ "${{ github.event.inputs.specific_template }}" != "" && "${{ github.event.inputs.specific_template }}" != "${{ matrix.template_id }}" ]]; then |
| 65 | + echo "skip=true" >> $GITHUB_OUTPUT |
| 66 | + else |
| 67 | + echo "skip=false" >> $GITHUB_OUTPUT |
| 68 | + fi |
| 69 | +
|
| 70 | + - name: Make script executable |
| 71 | + if: steps.check_template.outputs.skip != 'true' |
| 72 | + run: chmod +x official-templates/pytorch/update-template.sh |
| 73 | + |
| 74 | + - name: Update template via script |
| 75 | + if: steps.check_template.outputs.skip != 'true' |
| 76 | + env: |
| 77 | + RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }} |
| 78 | + run: ./official-templates/pytorch/update-template.sh ${{ matrix.template_id }} |
0 commit comments