一、环境介绍
系统:Centos7
Kubeflow版本:0.7.0
官方文档
https://github.com/kubeflow/kubeflow/tree/master/components/centraldashboard
二、开始
安装git
[root@localhost]# yum -y install git
make
[root@node1 centraldashboard]# pwd
/ssd/src/kubeflow-0.7.0/components/centraldashboard
[root@node1 centraldashboard]# make
docker tag
make成功后会生成两个image
#当前时间tag的image
gcr.io/kubeflow-dev/centraldashboard:v20200319-
#latest tag的image
gcr.io/kubeflow-dev/centraldashboard:latest
重新打tag
[root@node1 centraldashboard]#docker tag gcr.io/kubeflow-dev/centraldashboard:latest gcr.io/kubeflow-images-public/centraldashboard:youtag4.0
save images
把image保存成文件
[root@node1 centraldashboard]#docker save -o centraldashboard-image-youtag4.0.tar gcr.io/kubeflow-images-public/centraldashboard:youtag4.0
可以在其他服务器load此image
[root@node2 centraldashboard]#docker load -i centraldashboard-image-youtag4.0.tar
三、问题集锦
unsatisfiable constraints
问题
fetch http://nl.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
chromium-79.0.3945.130-r0:
breaks: world[chromium=72.0.3626.121-r0]
The command '/bin/sh -c apk update && apk upgrade && echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && apk add --no-cache bash chromium@edge=72.0.3626.121-r0 nss@edge freetype@edge harfbuzz@edge ttf-freefont@edge' returned a non-zero code: 1
chromium版本不匹配
解决
修改Dockerfile
gyp ERR! stack Error: EACCES: permission denied
问题
gyp ERR! stack Error: EACCES: permission denied, mkdir '/ssd/src/kubeflow-0.7.0/components/centraldashboard/node_modules/grpc/.node-gyp'
gyp ERR! System Linux 3.10.0-1062.1.2.el7.x86_64
解决
[root@localhost centraldashboard]#npm install node-pre-gyp --unsafe-perm=true --save-dev
npm ERR! code ELIFECYCLE
问题
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.20.3 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
解决
[root@localhost centraldashboard]#npm cache verify
[root@localhost centraldashboard]#npm cache clean --force
[root@localhost centraldashboard]#npm i -g npm
制作镜像的时候,执行make报错
问题
> kubeflow-centraldashboard@0.0.2 test-server /centraldashboard
> ts-node --transpile-only node_modules/jasmine/bin/jasmine --config=app/.jasmine.json --reporter=jasmine-console-reporter
Segmentation fault (core dumped)
The command '/bin/sh -c npm rebuild && npm install && npm test && npm run build && npm prune --production' returned a non-zero code: 139
make: *** [build] Error 139
解决
修改Dockerfile,将Dockerfile
将
RUN npm rebuild &&
npm install &&
npm test &&
npm run build &&
npm prune --production
修改为
RUN npm rebuild
RUN npm install
RUN npm test
RUN npm run build
RUN npm prune –production
制作镜像的时候,执行make报错
问题
HeadlessChrome 79.0.3945 (Linux 0.0.0): Executed 49 of 57 (1 FAILED) (0 secs / 1.586 secs)
WARN: 'Failed to parse JSON sent from null'
HeadlessChrome 79.0.3945 (Linux 0.0.0): Executed 50 of 57 (1 FAILED) (0 secs / 1.589 secs)
HeadlessChrome 79.0.3945 (Linux 0.0.0): Executed 57 of 57 (1 FAILED) (1.94 secs / 1.597 secs)
TOTAL: 1 FAILED, 56 SUCCESS
TOTAL: 1 FAILED, 56 SUCCESS
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! kubeflow-centraldashboard@0.0.2 test-client: `karma start --single-run`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the kubeflow-centraldashboard@0.0.2 test-client script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-03-18T09_17_13_111Z-debug.log
npm ERR! Test failed. See above for more details.
The command '/bin/sh -c npm rebuild && npm install && npm test && npm run build && npm prune --production' returned a non-zero code: 1
make: *** [build] Error 1
解决
修改package.json