Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tsoc
superbenchmark
Commits
7656f329
Unverified
Commit
7656f329
authored
Sep 13, 2021
by
Yifan Xiong
Committed by
GitHub
Sep 13, 2021
Browse files
CI/CD - Add ROCm image build in GitHub Actions (#194)
Add ROCm image build in GitHub Actions.
parent
7e48ad34
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
.github/workflows/build-image.yml
.github/workflows/build-image.yml
+17
-9
No files found.
.github/workflows/build-image.yml
View file @
7656f329
...
...
@@ -8,11 +8,21 @@ on:
branches
:
-
main
-
release/*
workflow_dispatch
:
jobs
:
docker
:
name
:
Docker build
name
:
Docker build
${{ matrix.name }}
runs-on
:
ubuntu-latest
strategy
:
matrix
:
include
:
-
name
:
cuda11.1.1
tags
:
superbench/main:cuda11.1.1,superbench/superbench:latest
-
name
:
rocm4.2-pytorch1.7.0
tags
:
superbench/main:rocm4.2-pytorch1.7.0
# - name: rocm4.0-pytorch1.7.0
# tags: superbench/main:rocm4.0-pytorch1.7.0
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v2
...
...
@@ -30,14 +40,12 @@ jobs:
-
name
:
Prepare metadata
id
:
metadata
run
:
|
DOCKER_IMAGE=superbench/superbench
IMAGE_TAG=latest
TAGS=${{ matrix.tags }}
DOCKERFILE=dockerfile/${{ matrix.name }}.dockerfile
DOCKERFILE=dockerfile/cuda11.1.1.dockerfile
TAGS="${DOCKER_IMAGE}:${IMAGE_TAG}"
CACHE_FROM="type=registry,ref=${DOCKER_IMAGE}:${IMAGE_TAG}"
CACHE_FROM="type=registry,ref=$(cut -d, -f1 <<< ${TAGS})"
CACHE_TO=""
if [ "${{ github.event_name }}" = "pu
sh
" ]; then
if [ "${{ github.event_name }}"
!
= "pu
ll_request
" ]; then
CACHE_TO="type=inline,mode=max"
fi
...
...
@@ -51,7 +59,7 @@ jobs:
uses
:
docker/setup-buildx-action@v1
-
name
:
Login to Docker Hub
uses
:
docker/login-action@v1
if
:
${{ github.event_name
=
= 'pu
sh
' }}
if
:
${{ github.event_name
!
= 'pu
ll_request
' }}
with
:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_TOKEN }}
...
...
@@ -62,7 +70,7 @@ jobs:
platforms
:
linux/amd64
context
:
.
file
:
${{ steps.metadata.outputs.dockerfile }}
push
:
${{ github.event_name
=
= 'pu
sh
' }}
push
:
${{ github.event_name
!
= 'pu
ll_request
' }}
tags
:
${{ steps.metadata.outputs.tags }}
cache-from
:
${{ steps.metadata.outputs.cache_from }}
cache-to
:
${{ steps.metadata.outputs.cache_to }}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment