-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (57 loc) · 1.89 KB
/
r3630-pytorch.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
name: Jetson Pytorch r36.3.0
on:
workflow_dispatch:
push:
branches:
- main
paths:
- ".github/workflows/r3630-pytorch.yml"
- "pytorch-images/r3630.Dockerfile"
pull_request:
branches:
- main
paths:
- ".github/workflows/r3630-pytorch.yml"
- "pytorch-images/r3630.Dockerfile"
env:
REGISTRY: ghcr.io
OWNER: kalanaratnayake
IMAGE_NAME: jetson-pytorch
# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
run: |
docker login --username ${{ env.OWNER }} --password ${{ secrets.GH_PAT }} ghcr.io
# uses: docker/login-action@v3
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and Push image
uses: docker/build-push-action@v5
with:
context: .
file: ./pytorch-images/r3630.Dockerfile
push: true
platforms: linux/arm64
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.IMAGE_NAME }}:r3630-buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.IMAGE_NAME }}:r3630-buildcache,mode=max
tags: |
${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.IMAGE_NAME }}:r36.3.0