-
Notifications
You must be signed in to change notification settings - Fork 5
72 lines (60 loc) · 2.37 KB
/
nccl_tests.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
name: Build nccl tests binaries
on:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
build:
- cuda_version: 12.4.1
build_args:
BASE_IMAGE=cr.eu-north1.nebius.cloud/soperator/nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
- name: Build docker images
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
with:
file: nccl-tests/Dockerfile
push: false
tags: nccl_tests_builder:${{ matrix.build.cuda_version }}
platforms: linux/amd64
load: true
build-args: |
${{ matrix.build.build_args }}
cache-from: type=local,src=.buildx-cache
cache-to: type=local,dest=.buildx-cache,mode=max
- name: Create nccl_tests_build_output directory
run: mkdir -p nccl_tests_build_output
- name: Run Docker container and copy files
run: |
container_id=$(docker create nccl_tests_builder:${{ matrix.build.cuda_version }})
docker start $container_id
docker cp $container_id:/usr/src/nccl-tests/build/nccl-tests-perf.tar.gz ./nccl_tests_build_output/
docker stop $container_id
docker rm $container_id
- name: Create GitHub Release and Upload NCCL tests
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: nccl_tests_${{ matrix.build.cuda_version }}
name: NCCL tests for cuda ${{ matrix.build.cuda_version }}
draft: false
prerelease: false
files: |
nccl_tests_build_output/nccl-tests-perf.tar.gz
- name: Cleanup
run: rm -rf nccl_tests_build_output/*.tar.gz