File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Run (SLOW) desired tests on our runner from a PR (applicable to GPUs only at the moment)
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ pr_number :
7+ description : ' PR number'
8+ required : true
9+ docker_image :
10+ default : ' diffusers/diffusers-pytorch-cuda'
11+ description : ' Name of the Docker image'
12+ required : true
13+ test_command :
14+ description : ' Test command to run (e.g.: `pytest tests/pipelines/dit/`). Any valid pytest command can be provided.'
15+ required : true
16+
17+ env :
18+ IS_GITHUB_CI : " 1"
19+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
20+ HF_HOME : /mnt/cache
21+ DIFFUSERS_IS_CI : yes
22+ OMP_NUM_THREADS : 8
23+ MKL_NUM_THREADS : 8
24+ RUN_SLOW : yes
25+
26+ jobs :
27+ run_tests :
28+ name : " Run a test on our runner from a PR"
29+ runs-on : [single-gpu, nvidia-gpu, "t4", ci]
30+ container :
31+ image : ${{ github.event.inputs.docker_image }}
32+ options : --gpus all --privileged --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
33+
34+ steps :
35+ - name : NVIDIA-SMI
36+ run : |
37+ nvidia-smi
38+
39+ - uses : actions/checkout@v3
40+ - name : Install `gh`
41+ run : |
42+ : # see https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian-ubuntu-linux-raspberry-pi-os-apt
43+ (type -p wget >/dev/null || (apt update && apt-get install wget -y)) \
44+ && mkdir -p -m 755 /etc/apt/keyrings \
45+ && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
46+ && chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
47+ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
48+ && apt update \
49+ && apt install gh -y
50+
51+ - name : Checkout the PR branch
52+ run : |
53+ gh pr checkout ${{ github.event.inputs.pr_number }}
54+
55+ - name : Run tests
56+ run : ${{ github.event.inputs.test_command }}
You can’t perform that action at this time.
0 commit comments