-
Notifications
You must be signed in to change notification settings - Fork 55
114 lines (110 loc) · 3.52 KB
/
Copy pathtest-notebooks.yml
File metadata and controls
114 lines (110 loc) · 3.52 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Copyright (c) 2023-2026, NVIDIA CORPORATION.
name: Test notebooks
on:
workflow_call:
inputs:
BUILD_TYPE:
required: true
type: string
ARCH:
required: true
type: string
GPU:
required: true
type: string
DRIVER:
required: true
type: string
CUDA_VER:
required: true
type: string
PYTHON_VER:
required: true
type: string
NOTEBOOKS_TAG:
required: true
type: string
defaults:
run:
shell: bash
permissions:
actions: read
checks: none
contents: read
deployments: none
discussions: none
id-token: write
issues: none
packages: read
pages: none
pull-requests: read
repository-projects: none
security-events: none
statuses: none
jobs:
test:
strategy:
matrix:
ARCH: ["${{ inputs.ARCH }}"]
CUDA_VER: ["${{ inputs.CUDA_VER }}"]
PYTHON_VER: ["${{ inputs.PYTHON_VER }}"]
GPU: ["${{ inputs.GPU }}"]
DRIVER: ["${{ inputs.DRIVER }}"]
fail-fast: false
# Referencing something from the 'matrix' context prevents GitHub auto-generating
# a hard-to-read name with all the matrix input values.
#
# The 'name:' in this file also becomes the name in the left-hand navigation list
# on the 'Summary' page, so should be more specific than the one in the calling workflow.
name: test (${{ matrix.CUDA_VER }}, py${{ matrix.PYTHON_VER }}, ${{ matrix.ARCH }}, ${{ matrix.GPU}}, ${{ matrix.DRIVER }})
runs-on: "linux-${{ inputs.ARCH }}-gpu-${{ inputs.GPU }}-${{ inputs.DRIVER }}-1"
container:
image: ${{ inputs.NOTEBOOKS_TAG }} # zizmor: ignore[unpinned-images]
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
RAPIDS_BUILD_TYPE: ${{ inputs.BUILD_TYPE }}
RAPIDS_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Install required tools
run: |
conda install -n base --freeze-installed \
curl \
git
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
persist-credentials: false
- name: Install gha-tools
run: |
context/scripts/install-gha-tools
- name: Get RAPIDS GitHub Info
id: get-rapids-github-info
uses: rapidsai/shared-actions/rapids-github-info@main # zizmor: ignore[unpinned-uses]
- name: Print environment
run: |
rapids-print-env
rapids-logger "nvidia-smi"
nvidia-smi
- name: Test notebooks
run: /home/rapids/test_notebooks.py -i /home/rapids/notebooks -o /home/rapids/notebooks_output
- name: Install awscli
if: '!cancelled()'
run: |
rapids-conda-retry install -n base awscli
- uses: aws-actions/configure-aws-credentials@254c19bd240aabef8777f48595e9d2d7b972184b # v6.2.1
if: '!cancelled()'
with:
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}
role-duration-seconds: 1800 # 30m
- name: Upload notebook test outputs
if: '!cancelled()'
env:
ARCH: ${{ inputs.ARCH }}
CUDA_VER: ${{ inputs.CUDA_VER }}
PYTHON_VER: ${{ inputs.PYTHON_VER }}
GPU: ${{ inputs.GPU }}
DRIVER: ${{ inputs.DRIVER }}
run: |
rapids-upload-to-s3 test_notebooks_output_${ARCH}_cuda${CUDA_VER}_py${PYTHON_VER}_${GPU}-${DRIVER}.tar.gz /home/rapids/notebooks_output