-
-
Notifications
You must be signed in to change notification settings - Fork 59
120 lines (106 loc) · 3.59 KB
/
docker.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
name: Docker
on:
push:
branches:
- master
jobs:
docker:
name: Docker
runs-on: ubuntu-latest
# Start a local registry to which we will push trame-common, so that
# docker buildx may access it in later steps.
services:
registry:
image: registry
ports:
- 5000:5000
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# To emulate other architectures
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# For multi-platform builds
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host
- name: Create month stamp
run: echo "MONTH_STAMP=$(date +%Y-%m)" >> $GITHUB_ENV
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build common
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
context: docker
file: docker/Dockerfile.common
push: true
tags: localhost:5000/trame-common
- name: Build common (glvnd)
uses: docker/build-push-action@v2
with:
context: docker
file: docker/Dockerfile.common
build-args: BASE_IMAGE=nvidia/opengl:1.2-glvnd-devel-ubuntu20.04
push: true
tags: localhost:5000/trame-common-glvnd
- name: Build common (cuda)
uses: docker/build-push-action@v2
with:
context: docker
file: docker/Dockerfile.common
build-args: BASE_IMAGE=nvidia/cuda:12.2.0-runtime-ubuntu20.04
push: true
tags: localhost:5000/trame-common-cuda
- name: Build and push (pip)
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
context: docker
file: docker/Dockerfile.pip
build-args: BASE_IMAGE=localhost:5000/trame-common
push: true
tags: |
kitware/trame:latest
kitware/trame:ubuntu-20.04-py39
kitware/trame:${{ env.MONTH_STAMP }}
- name: Build and push (pip glvnd)
uses: docker/build-push-action@v2
with:
context: docker
file: docker/Dockerfile.pip
build-args: BASE_IMAGE=localhost:5000/trame-common-glvnd
push: true
tags: |
kitware/trame:glvnd
kitware/trame:1.2-glvnd-runtime-ubuntu20.04-py39
kitware/trame:glvnd_${{ env.MONTH_STAMP }}
- name: Build and push (pip cuda)
uses: docker/build-push-action@v2
with:
context: docker
file: docker/Dockerfile.pip
build-args: BASE_IMAGE=localhost:5000/trame-common-cuda
push: true
tags: |
kitware/trame:cuda
kitware/trame:12.2.0-cuda-runtime-ubuntu20.04-py39
kitware/trame:cuda_${{ env.MONTH_STAMP }}
- name: Build and push (conda)
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
context: docker
file: docker/Dockerfile.conda
build-args: BASE_IMAGE=localhost:5000/trame-common
push: true
tags: |
kitware/trame:conda
kitware/trame:conda_ubuntu-20.04-py39
kitware/trame:conda_${{ env.MONTH_STAMP }}