forked from wolfi-dev/os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkubeflow-pipelines-visualization-server.yaml
201 lines (175 loc) · 5.99 KB
/
kubeflow-pipelines-visualization-server.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
package:
name: kubeflow-pipelines-visualization-server
version: 2.3.0
epoch: 3
description: Machine Learning Pipelines for Kubeflow
copyright:
- license: Apache-2.0
target-architecture:
- x86_64 # Since tensorflow-data-validation is not available for aaarch64 yet
dependencies:
runtime:
- py3.10-google-cloud-sdk
- python-3.10
environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- openssf-compiler-options
- py3.10-crcmod
- py3.10-pip
- python-3.10
- python-3.10-dev
pipeline:
- uses: git-checkout
with:
repository: https://github.com/kubeflow/pipelines
tag: ${{package.version}}
expected-commit: 4467df5f9c8242d389f20214f75fecfc4119e8cd
- uses: patch
with:
patches: 0001-Bump-dependencies.patch
- runs: |
ln -sf /usr/bin/python3.10 /usr/bin/python3
mkdir -p ${{targets.destdir}}/usr/share/app
cp -r backend/src/apiserver/visualization/* ${{targets.destdir}}/usr/share/app/
cd ${{targets.destdir}}/usr/share/app/
sed -i 's/tensorflow==/#tensorflow==/g' requirements.txt
pip install --root=${{targets.destdir}} --prefix=/usr -r requirements.txt
find ${{targets.destdir}} -name "*.pyc" -exec rm -rf '{}' +
# "collections" is deprecated in Python 3.10, use "collections.abc" instead
sed -i 's/collections/collections.abc/g' ${{targets.destdir}}/usr/lib/python3.10/site-packages/gcsfs/mapping.py
# CVE-2023-47248, GHSA-5wvp-7f3h-6wmm
pip install pyarrow-hotfix
sed -i '1 i\import pyarrow_hotfix' server.py
- uses: strip
update:
enabled: true
ignore-regex-patterns:
- "sdk-"
github:
identifier: kubeflow/pipelines
test:
environment:
contents:
packages:
- curl
- bash
pipeline:
- runs: |
#!/bin/bash
set -x
# start the server
export HOME=/usr/share/app
cd $HOME
/usr/bin/python server.py &
sleep 5
# simulate the upstream unit test suite: https://github.com/kubeflow/pipelines/blob/master/backend/src/apiserver/visualization/test_server.py
BASE_URL="http://localhost:8888"
# Function to print error message and exit on failure
exit_on_failure() {
echo "$1" # Print error message
exit 1 # Exit with error status
}
# Function to perform a curl request and check the expected status
do_test() {
local url=$1
local method=$2
local data=$3
local expected_status=$4
if [ "$method" = "POST" ]; then
response=$(curl -s -o /dev/null -w "%{http_code}" -X POST "$url" --data "$data")
else
response=$(curl -s -o /dev/null -w "%{http_code}" -X GET "$url")
fi
if [ "$response" != "$expected_status" ]; then
exit_on_failure "Test failed at $url. Expected HTTP status $expected_status, got $response."
fi
}
# Test: healthcheck
do_test "${BASE_URL}/" "GET" "" "200"
# Test: create_visualization_fails_when_nothing_is_provided
do_test "${BASE_URL}/" "POST" "" "400"
# Test: create_visualization_fails_when_missing_type
do_test "${BASE_URL}/" "POST" "source=gs://ml-pipeline/data.csv" "400"
# Test: create_visualization_fails_when_missing_source
do_test "${BASE_URL}/" "POST" "type=test" "400"
# Test: create_visualization_passes_when_missing_source_and_type_is_custom
do_test "${BASE_URL}/" "POST" "type=custom" "200"
# Test: create_visualization_fails_when_invalid_json_is_provided
do_test "${BASE_URL}/" "POST" "type=test&source=gs://ml-pipeline/data.csv&arguments={" "400"
# Test: create_visualization
do_test "${BASE_URL}/" "POST" "type=test&source=gs://ml-pipeline/data.csv" "200"
echo "All tests passed."
bokeh --version
bokeh --help
f2py --version
f2py --help
fastavro --version
fastavro --help
gen_client --help
hdfscli --version
hdfscli --help
hdfscli-avro --help
ipython --version
ipython --help
ipython3 --version
ipython3 --help
jsonschema --version
jsonschema --help
jupyter --version
jupyter --help
jupyter-bundlerextension --version
jupyter-bundlerextension --help
jupyter-kernel --version
jupyter-kernel --help
jupyter-kernelspec --version
jupyter-kernelspec --help
jupyter-migrate --version
jupyter-migrate --help
jupyter-nbclassic --version
jupyter-nbclassic --help
jupyter-nbclassic-bundlerextension --version
jupyter-nbclassic-bundlerextension --help
jupyter-nbclassic-extension --version
jupyter-nbclassic-extension --help
jupyter-nbclassic-serverextension --version
jupyter-nbclassic-serverextension --help
jupyter-nbconvert --version
jupyter-nbconvert --help
jupyter-nbextension --version
jupyter-nbextension --help
jupyter-run --version
jupyter-run --help
jupyter-server --version
jupyter-server --help
jupyter-serverextension --version
jupyter-serverextension --help
jupyter-troubleshoot --version
jupyter-troubleshoot --help
jupyter-trust --version
jupyter-trust --help
markdown_py --version
markdown_py --help
normalizer --version
normalizer --help
pygmentize -v
pygmentize --help
pyrsa-decrypt --help
pyrsa-encrypt --help
pyrsa-keygen --help
pyrsa-priv2pub --help
pyrsa-sign --help
pyrsa-verify --help
send2trash --help
sqlformat --version
sqlformat --help
tf_upgrade_v2 --help
tflite_convert --help
toco --help
toco_from_protos --help
wheel version
wheel --help
wsdump --help