-
Notifications
You must be signed in to change notification settings - Fork 50
146 lines (141 loc) · 5.09 KB
/
gpu.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
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: gpu-ci
on:
workflow_dispatch:
push:
branches:
- main
- pull-request/*
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
gpu-ci:
runs-on: linux-amd64-gpu-p100-latest-1
strategy:
matrix:
image:
[
"nvcr.io/nvidia/tensorflow:23.02-tf2-py3",
"nvcr.io/nvidia/tensorflow:23.04-tf2-py3",
"nvcr.io/nvidia/tensorflow:23.06-tf2-py3",
]
container:
image: ${{ matrix.image }}
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install and upgrade python packages
run: |
python -m pip install --upgrade pip tox
- uses: actions/cache@v3
with:
path: .tox
key: tox-${{ matrix.image }}-${{ hashFiles('requirements/*.txt') }}
- name: Get Branch name
id: get-branch-name
uses: NVIDIA-Merlin/.github/actions/branch-name@6f0539fba24f60da2aee63c5925bee7cee3206e3
- name: Run tests
run: |
if [ "${{ github.ref }}" != 'refs/heads/main' ]; then
extra_pytest_markers="and changed"
fi
merlin_branch="${{ steps.get-branch-name.outputs.branch }}"
MERLIN_BRANCH=$merlin_branch COMPARE_BRANCH=$merlin_branch \
PYTEST_MARKERS="unit and not (examples or integration or notebook) $extra_pytest_markers" \
tox -e gpu
# gpu-cu11:
# runs-on: linux-amd64-gpu-p100-latest-1
# env:
# IMAGE: "nvidia/cuda:11.8.0-runtime-ubuntu22.04"
# container:
# image: ${{ env.IMAGE }}
# env:
# NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
# strategy:
# matrix:
# versions: [{ rapids: "23.04", python: "3.8" }]
# steps:
# - name: Install Ubuntu packages
# run: |
# apt-get update -y
# apt-get install -y \
# git \
# 'libcudnn8=*cuda11.8' `# tensorflow GPU support` \
# cuda-nvcc-11-8 `# required for numba`
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: Set up Python ${{ matrix.version.python }}
# id: setup-python
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.version.python }}
# - uses: actions/cache@v3
# with:
# path: .tox
# key: tox-${{ matrix.IMAGE }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('requirements/*.txt') }}
# - name: Install and upgrade python packages
# run: |
# python -m pip install --upgrade pip tox
# - name: Get Branch name
# id: get-branch-name
# uses: NVIDIA-Merlin/.github/actions/branch-name@6f0539fba24f60da2aee63c5925bee7cee3206e3
# - name: Run tests
# run: |
# if [ "${{ github.ref }}" != 'refs/heads/main' ]; then
# extra_pytest_markers="and changed"
# fi
# merlin_branch="${{ steps.get-branch-name.outputs.branch }}"
# RAPIDS_VERSION=${{ matrix.version.rapids }} MERLIN_BRANCH=$merlin_branch COMPARE_BRANCH=$merlin_branch \
# PYTEST_MARKERS="unit and not (examples or integration or notebook) $extra_pytest_markers" \
# tox -e gpu-cu11
tests-examples:
runs-on: linux-amd64-gpu-p100-latest-1
container:
image: "nvidia/cuda:11.8.0-runtime-ubuntu22.04"
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
strategy:
matrix:
version: [{ rapids: "23.04", python: "3.8" }]
steps:
- name: Install Ubuntu packages
run: |
apt-get update -y
# libcudnn8 installed for tensorflow GPU support
apt-get install -y \
git \
'libcudnn8=*cuda11.8' `# tensorflow GPU support` \
cuda-nvcc-11-8 `# required for numba`
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.version.python }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version.python }}
- uses: actions/cache@v3
with:
path: .tox
key: tox-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('requirements/*.txt') }}
- name: Install and upgrade python packages
run: |
python -m pip install --upgrade pip tox
- name: Get Branch name
id: get-branch-name
uses: NVIDIA-Merlin/.github/actions/branch-name@6f0539fba24f60da2aee63c5925bee7cee3206e3
- name: Run tests
run: |
if [ "${{ github.ref }}" != 'refs/heads/main' ]; then
extra_pytest_markers="and changed"
fi
merlin_branch="${{ steps.get-branch-name.outputs.branch }}"
RAPIDS_VERSION=${{ matrix.version.rapids }} MERLIN_BRANCH=$merlin_branch COMPARE_BRANCH=$merlin_branch \
PYTEST_MARKERS="(examples or notebook) $extra_pytest_markers" \
tox -e gpu-cu11