-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (63 loc) · 2.19 KB
/
cuda-llvm.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
name: Build CUDA LLVM
on:
workflow_dispatch:
# pull_request:
# paths:
# - ".github/workflows/build.yml"
# - "docker/**"
# - "build.sh"
concurrency:
group: llvm-cuda-${{ github.ref }}
cancel-in-progress: true
env:
REGION_ID: cn-beijing
ACR_REGISTRY: registry.cn-beijing.aliyuncs.com
ACR_NAMESPACE: oneflow
DOCKER_HUB_NAMESPACE: oneflowinc
jobs:
build_img:
name: Build ${{ matrix.tag-suffix }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
tag-suffix: ["llvm13_cuda11.2", "llvm13_cuda10.1", ]
include:
- tag-suffix: "llvm13_cuda11.2"
BASE_IMAGE: "nvidia/cuda:11.2.2-cudnn8-devel-ubuntu20.04"
- tag-suffix: "llvm13_cuda10.1"
BASE_IMAGE: "nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04"
env:
DOCKER_REPO: "${{ matrix.tag-suffix }}"
BASE_IMAGE: "${{ matrix.BASE_IMAGE }}"
steps:
- name: Checkout
uses: actions/checkout@v2
# 1.1 Login to ACR
- name: Login to ACR with the AccessKey pair
uses: aliyun/acr-login@v1
with:
login-server: https://registry.${{env.REGION_ID}}.aliyuncs.com
username: "${{ secrets.ACR_USERNAME }}"
password: "${{ secrets.ACR_PASSWORD }}"
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
uses: docker/build-push-action@v2
with:
push: true
tags: |
${{ env.DOCKER_HUB_NAMESPACE }}/${{ env.DOCKER_REPO }}:latest
${{ env.DOCKER_HUB_NAMESPACE }}/${{ env.DOCKER_REPO }}:${{ github.sha }}
${{ env.ACR_REGISTRY }}/${{ env.ACR_NAMESPACE }}/${{ env.DOCKER_REPO }}:latest
${{ env.ACR_REGISTRY }}/${{ env.ACR_NAMESPACE }}/${{ env.DOCKER_REPO }}:${{ github.sha }}
cache-from: type=registry,ref=${{ env.DOCKER_HUB_NAMESPACE }}/${{ env.DOCKER_REPO }}:latest
cache-to: type=inline
context: ./cuda-llvm
build-args: |
BASE_IMAGE