-
Notifications
You must be signed in to change notification settings - Fork 8
60 lines (54 loc) · 1.46 KB
/
amd_workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: AMD PyTorch Job
on:
workflow_dispatch:
inputs:
payload:
description: 'Content of the user submission, as json string'
required: true
type: string
requirements:
description: 'Contents for a requirements.txt file'
required: false
type: string
jobs:
run:
runs-on: [amdgpu-mi250-x86-64]
timeout-minutes: 10
env:
VENV_DIR: /groups/aig_sharks/pytorch_venv
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Create input files
shell: bash
run: |
cat > "payload.json" <<'EOL'
${{ github.event.inputs.payload }}
EOL
- name: Setup Virtual Environment and Install Dependencies
shell: bash
run: |
python -m venv ${VENV_DIR}
source ${VENV_DIR}/bin/activate
pip install --upgrade pip
if [[ -n "${{ github.event.inputs.requirements }}" ]]; then
cat > "requirements.txt" <<'EOL'
${{ github.event.inputs.requirements }}
EOL
pip install -r "requirements.txt"
fi
- name: Run script
shell: bash
run: |
python3 .github/workflows/runner.py
cat result.json # Debug: show output
- name: Upload training artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: run-result
path: |
result.json