-
Notifications
You must be signed in to change notification settings - Fork 7
167 lines (166 loc) · 7.29 KB
/
ci.yaml
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: CI test build
on:
pull_request:
branches:
- main
workflow_dispatch: {}
jobs:
cuda:
runs-on: ubuntu-latest
strategy:
matrix:
driver_version: ["470.82.01", "510.47.03", "515.65.01", "525.85.12", "535.54.03"]
driver_kind: ["cuda"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- uses: paulhatch/[email protected]
with:
bump_each_commit: false
version_format: "${{ matrix.driver_kind}}-${{ matrix.driver_version }}-sha-${GITHUB_SHA:0:6}"
id: semver
- name: 'Check version'
run: |
echo "version is ${{ steps.semver.outputs.version }}"
echo "version is ${{ steps.semver.outputs.version_tag }}"
- name: 'Build and Push'
run: |
set -x
echo "tag is: "
echo ${{ steps.semver.outputs.version }}
docker buildx build --build-arg DRIVER_KIND=${{ matrix.driver_kind }} --build-arg DRIVER_VERSION=${{ matrix.driver_version }} --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache-new --output=type=docker -t ${{ secrets.AZURE_REGISTRY_SERVER }}/public/aks/aks-gpu:${{ steps.semver.outputs.version }} .
docker images
- name: Move cache
run: |
rm -r /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
grid470:
runs-on: ubuntu-latest
strategy:
matrix:
driver_version: ["470.82.01"]
driver_kind: ["grid"]
driver_url: ["https://download.microsoft.com/download/a/3/c/a3c078a0-e182-4b61-ac9b-ac011dc6ccf4/NVIDIA-Linux-x86_64-470.82.01-grid-azure.run"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ matrix.driver_kind}}-${{ matrix.driver_version }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-${{ matrix.driver_kind}}-${{ matrix.driver_version }}
- uses: paulhatch/[email protected]
with:
bump_each_commit: false
version_format: "${{ matrix.driver_kind}}-${{ matrix.driver_version }}-sha-${GITHUB_SHA:0:6}"
id: semver
- name: 'Check version'
run: |
echo "version is ${{ steps.semver.outputs.version }}"
echo "version is ${{ steps.semver.outputs.version_tag }}"
- name: 'Build and Push'
run: |
set -x
echo "tag is: "
echo ${{ steps.semver.outputs.version }}
docker buildx build --build-arg DRIVER_URL=${{ matrix.driver_url }} --build-arg DRIVER_KIND=${{ matrix.driver_kind }} --build-arg DRIVER_VERSION=${{ matrix.driver_version }} --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache-new --output=type=docker -t ${{ secrets.AZURE_REGISTRY_SERVER }}/public/aks/aks-gpu:${{ steps.semver.outputs.version }} .
docker images
- name: Move cache
run: |
rm -r /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
grid510:
runs-on: ubuntu-latest
strategy:
matrix:
driver_version: ["510.73.08"]
driver_kind: ["grid"]
driver_url: ["https://download.microsoft.com/download/6/2/5/625e22a0-34ea-4d03-8738-a639acebc15e/NVIDIA-Linux-x86_64-510.73.08-grid-azure.run"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ matrix.driver_kind}}-${{ matrix.driver_version }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-${{ matrix.driver_kind}}-${{ matrix.driver_version }}
- uses: paulhatch/[email protected]
with:
bump_each_commit: false
version_format: "${{ matrix.driver_kind}}-${{ matrix.driver_version }}-sha-${GITHUB_SHA:0:6}"
id: semver
- name: 'Check version'
run: |
echo "version is ${{ steps.semver.outputs.version }}"
echo "version is ${{ steps.semver.outputs.version_tag }}"
- name: 'Build and Push'
run: |
set -x
echo "tag is: "
echo ${{ steps.semver.outputs.version }}
docker buildx build --build-arg DRIVER_URL=${{ matrix.driver_url }} --build-arg DRIVER_KIND=${{ matrix.driver_kind }} --build-arg DRIVER_VERSION=${{ matrix.driver_version }} --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache-new --output=type=docker -t ${{ secrets.AZURE_REGISTRY_SERVER }}/public/aks/aks-gpu:${{ steps.semver.outputs.version }} .
docker images
- name: Move cache
run: |
rm -r /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
grid535:
runs-on: ubuntu-latest
strategy:
matrix:
driver_version: ["535.54.03"]
driver_kind: ["grid"]
driver_url: ["https://download.microsoft.com/download/2/e/8/2e85b622-d376-4166-be95-38fd60f18eda/NVIDIA-Linux-x86_64-535.54.03-grid-azure.run"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ matrix.driver_kind}}-${{ matrix.driver_version }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-${{ matrix.driver_kind}}-${{ matrix.driver_version }}
- uses: paulhatch/[email protected]
with:
bump_each_commit: false
version_format: "${{ matrix.driver_kind}}-${{ matrix.driver_version }}-sha-${GITHUB_SHA:0:6}"
id: semver
- name: 'Check version'
run: |
echo "version is ${{ steps.semver.outputs.version }}"
echo "version is ${{ steps.semver.outputs.version_tag }}"
- name: 'Build and Push'
run: |
set -x
echo "tag is: "
echo ${{ steps.semver.outputs.version }}
docker buildx build --build-arg DRIVER_URL=${{ matrix.driver_url }} --build-arg DRIVER_KIND=${{ matrix.driver_kind }} --build-arg DRIVER_VERSION=${{ matrix.driver_version }} --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache-new --output=type=docker -t ${{ secrets.AZURE_REGISTRY_SERVER }}/public/aks/aks-gpu:${{ steps.semver.outputs.version }} .
docker images
- name: Move cache
run: |
rm -r /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache