Skip to content

Commit 7349347

Browse files
authored
Docker Github action and training container update (#9)
* update GHA * reorganize training container
1 parent 8dd7450 commit 7349347

File tree

18 files changed

+123
-2050
lines changed

18 files changed

+123
-2050
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build & publish PDK images
2+
on:
3+
release:
4+
types: [published]
5+
6+
7+
8+
jobs:
9+
build-and-push-image:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- dockerfolder: examples/training_container/
16+
prefix: train
17+
- dockerfolder: examples/brain-mri/container/deploy/
18+
prefix: brain-deploy
19+
- dockerfolder: examples/dog-cat/container/deploy/
20+
prefix: dog-cat-deploy
21+
- dockerfolder: examples/object-detection/container/deploy/
22+
prefix: object-detection-deploy
23+
- dockerfolder: examples/sentiment-analysis/container/deploy/
24+
prefix: sentiment-analysis-deploy
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v2
29+
-
30+
name: Docker meta
31+
id: meta
32+
uses: docker/metadata-action@v5
33+
with:
34+
images: pachyderm/pdk
35+
flavor: |
36+
prefix=${{ matrix.prefix }}-
37+
-
38+
name: Login to Docker Hub
39+
uses: docker/login-action@v3
40+
with:
41+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
42+
password: ${{ secrets.DOCKERHUB_TOKEN }}
43+
-
44+
name: Build and push
45+
uses: docker/build-push-action@v5
46+
with:
47+
context: ${{ matrix.dockerfolder }}
48+
push: true
49+
tags: ${{ steps.meta.outputs.tags }}
50+
labels: ${{ steps.meta.outputs.labels }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Build & publish PDK images
2+
on:
3+
pull_request:
4+
5+
6+
jobs:
7+
build-and-push-image:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- dockerfolder: examples/training_container/
14+
prefix: train
15+
- dockerfolder: examples/brain-mri/container/deploy/
16+
prefix: brain-deploy
17+
- dockerfolder: examples/dog-cat/container/deploy/
18+
prefix: dog-cat-deploy
19+
- dockerfolder: examples/object-detection/container/deploy/
20+
prefix: object-detection-deploy
21+
- dockerfolder: examples/sentiment-analysis/container/deploy/
22+
prefix: sentiment-analysis-deploy
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v3
27+
- uses: dorny/paths-filter@v2
28+
id: filter
29+
with:
30+
base: main
31+
filters: |
32+
dockerchange:
33+
- '${{ matrix.dockerfolder }}**'
34+
-
35+
name: Docker meta
36+
id: meta
37+
if: steps.filter.outputs.dockerchange == 'true'
38+
uses: docker/metadata-action@v5
39+
with:
40+
images: pachyderm/pdk
41+
tags: |
42+
# branch event
43+
type=sha,prefix=${{ matrix.prefix }}-,event=branch
44+
# tag event
45+
type=ref,prefix=${{ matrix.prefix }}-,event=tag
46+
flavor: |
47+
48+
-
49+
name: Login to Docker Hub
50+
uses: docker/login-action@v3
51+
if: steps.filter.outputs.dockerchange == 'true'
52+
with:
53+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
54+
password: ${{ secrets.DOCKERHUB_TOKEN }}
55+
-
56+
name: Build and push
57+
uses: docker/build-push-action@v5
58+
if: steps.filter.outputs.dockerchange == 'true'
59+
with:
60+
context: ${{ matrix.dockerfolder }}
61+
push: true
62+
tags: ${{ steps.meta.outputs.tags }}
63+
labels: ${{ steps.meta.outputs.labels }}

examples/brain-mri/container/train/debug.py

-258
This file was deleted.

examples/brain-mri/container/train/requirements.txt

-1
This file was deleted.

0 commit comments

Comments
 (0)