我正在尝试创建一个Kubeflow Pipeline组件。我的命令在本地Docker容器中工作得很好,但在Kubeflow管道中的Pod中,它以以下方式终止:
ipython/tmp/input-postgresql。Ipynb: 1: ipython/tmp/input-postgresql。ipynb:语法错误:end of file unexpected
在Docker上复制:
docker run -it continuumio/anaconda3:2020.07/bin/sh
curl -o/tmp/input-postgresql。ipynb https://raw.githubusercontent.com/IBM/claimed/master/component-library/input/input-postgresql.ipynb &&ipython/tmp/input-postgresql.ipynb
要在Kubeflow 1.6.0上复制,请使用管道。yaml文件
必须更改组件。Yaml现在可以工作了
更改了命令定义的语法,因此还需要找出如何传递参数:
implementation:
container:
image: continuumio/anaconda3:2020.07
command:
- sh
- -ec
- |
host=$0
database=$1
user=$2
password=$3
port=$4
sql=$5
data_dir=$6
output_data_csv=$7
mkdir -p $output_data_csv
wget https://raw.githubusercontent.com/IBM/claimed/master/component-library/input/input-postgresql.ipynb
ipython ./input-postgresql.ipynb host=$host database=$database user=$user password=$password port=$port sql=$sql data_dir=$data_dir output_data_csv=$output_data_csv
- {inputValue: host}
- {inputValue: database}
- {inputValue: user}
- {inputValue: password}
- {inputValue: port}
- {inputValue: sql}
- {inputValue: data_dir}
- {outputPath: output_data_csv}