This repository was archived by the owner on Oct 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
104 lines (87 loc) · 3.16 KB
/
notebook-docker-build.yaml
File metadata and controls
104 lines (87 loc) · 3.16 KB
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
name: Build Notebook Docker images
on:
push:
branches:
paths:
- 'deploy/docker/notebook/VERSION'
pull_request:
branches: [ master ]
types: [closed]
paths:
- 'deploy/docker/notebook/VERSION'
workflow_dispatch:
jobs:
notebook-docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get Notebook Version
run: echo "notebook_version=`cat deploy/docker/notebook/VERSION`" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: polusbot
password: ${{ secrets.POLUS_DOCKER_TOKEN }}
- name: Prepare Notebook Dockerfile
run: |
npm install -g polus-railyard@0.3.2
mkdir -p manifests
railyard assemble -t Dockerfile.template -b base.yaml -a values.yaml -p manifests
ls -la manifests
dir=$(find manifests -mindepth 1 -maxdepth 1 -type d)
echo "$dir"
echo "docker_context=deploy/docker/notebook/$dir" >> $GITHUB_ENV
working-directory: deploy/docker/notebook
- name: Build Notebook Docker image
uses: docker/build-push-action@v2
with:
context: ${{ env.docker_context }}
push: true
tags: labshare/polyglot-notebook:${{ env.notebook_version }}
notebook-gpu-docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get Notebook Version
run: echo "notebook_version=`cat deploy/docker/notebook/VERSION`" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: polusbot
password: ${{ secrets.POLUS_DOCKER_TOKEN }}
- name: Prepare Notebook Dockerfile
run: |
npm install -g polus-railyard@0.3.2
mkdir -p manifests
railyard assemble -t Dockerfile.template -b base_gpu.yaml -a values.yaml -p manifests
ls -la manifests
dir=$(find manifests -mindepth 1 -maxdepth 1 -type d)
echo "$dir"
echo "docker_context=deploy/docker/notebook/$dir" >> $GITHUB_ENV
working-directory: deploy/docker/notebook
- name: Build Notebook Docker image
uses: docker/build-push-action@v2
with:
context: ${{ env.docker_context }}
push: true
tags: labshare/polyglot-notebook:${{ env.notebook_version }}-gpu
env-module-docker-build:
runs-on: ubuntu-latest
needs: notebook-docker-build
steps:
- uses: actions/checkout@v3
- name: Get Notebook Version
run: echo "notebook_version=`cat deploy/docker/notebook/VERSION`" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: polusbot
password: ${{ secrets.POLUS_DOCKER_TOKEN }}
- name: Prepare Environment Module Installer Dockerfile
run: sed -i.bak -e "s/NOTEBOOK_VERSION_LATEST_VALUE/${{ env.notebook_version }}/g" deploy/docker/env-installer/Dockerfile
- name: Build Environment Module Installer Docker image
uses: docker/build-push-action@v2
with:
context: deploy/docker/env-installer
push: true
tags: polusai/notebook-env-module-installer:${{ env.notebook_version }}