forked from wolfi-dev/os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kubeflow-jupyter-web-app.yaml
94 lines (82 loc) · 2.89 KB
/
kubeflow-jupyter-web-app.yaml
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
package:
name: kubeflow-jupyter-web-app
version: 1.9.2
epoch: 2
description: Kubeflow jupyter web app component
copyright:
- license: Apache-2.0
dependencies:
runtime:
- bash
- py3-gunicorn
- python3
environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- cython
- nodejs-16
- npm
- openssf-compiler-options
- openssl
- openssl-provider-legacy
- py3-pip
- py3-setuptools
- py3-urllib3
- py3-wheel
- python3
- python3-dev
- wolfi-base
pipeline:
- uses: git-checkout
with:
repository: https://github.com/kubeflow/kubeflow
tag: v${{package.version}}
expected-commit: 315ee7e305e8b7485c975283fb7e5751d21f267d
- runs: |
# Build the backend common libs into a wheel
cd components/crud-web-apps/common/backend
# Remove the version requirement on gevent. This was introduced in this PR: https://github.com/kubeflow/kubeflow/pull/7231/files
# The dependency was pinned due to a build issue on ppc64le: https://github.com/kubeflow/kubeflow/issues/7226
sed -i -E 's/gevent[^"]+/gevent/g' setup.py
# Setup the virtualenv
python -m venv venv --system-site-packages
source venv/bin/activate
python3 ./setup.py bdist_wheel
ls -latr dist
pip install -I --no-compile dist/*.whl --prefix=/usr --root="${{targets.destdir}}"
pip install . --prefix=/usr --root="${{targets.destdir}}"
# Mitigate GHSA-34jh-p97f-mpxf
pip install urllib3==2.2.2 --prefix=/usr --root="${{targets.destdir}}"
ls -latr /usr/lib/python3.12/site-packages
cd ../../jupyter/backend
# pip install -r requirements.txt --prefix=/usr --root="${{targets.destdir}}"
# Build the frontend common packages
cd ../../common/frontend/kubeflow-common-lib
npm ci
npm run build
# Build the frontend and copy the common package into it
cd ../../../jupyter/frontend
npm ci
mv ../../common/frontend/kubeflow-common-lib/dist/kubeflow node_modules/
# This usually uses node 12, but it works with this.
export NODE_OPTIONS=--openssl-legacy-provider
npm run build -- --output-path=./dist/default --configuration=production
# Now move it all into place
mkdir -p "${{targets.destdir}}/usr/share/kubeflow-jupyter-web-app/"
# Move the backend
mv ../backend/apps "${{targets.destdir}}/usr/share/kubeflow-jupyter-web-app/"
mv ../backend/entrypoint.py "${{targets.destdir}}/usr/share/kubeflow-jupyter-web-app/"
# Move the frontend
mv ../frontend/dist/default "${{targets.destdir}}/usr/share/kubeflow-jupyter-web-app/apps/default/static"
- uses: strip
update:
enabled: true
github:
identifier: kubeflow/kubeflow
use-tag: true
# There were some malformed early tags
tag-filter: v1
strip-prefix: v