ipython terminates with 'Syntax error: end of file unexpected' inside Kubeflow Pod, not happening in Docker container

ipython terminates with 'Syntax error: end of file unexpected' inside Kubeflow Pod, not happening in Docker container

我正在尝试创建一个 Kubeflow 管道组件。我的命令在本地 Docker 容器中运行良好,但在 Kubeflow Pipeline 的 Pod 中它终止于:

ipython /tmp/input-postgresql.ipynb: 1: ipython /tmp/input-postgresql.ipynb: Syntax error: 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 上重现,请使用 pipeline.yaml 文件

必须更改 component.yaml 现在可以使用了

更改了命令定义的语法,因此还需要了解如何传递参数:

implementation:
  container:
    image: continuumio/anaconda3:2020.07
    command:
    - sh
    - -ec
    - |
      host=[=10=]
      database=
      user=
      password=
      port=
      sql=
      data_dir=
      output_data_csv=
      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}