我想捆绑Python包kedro,它提供了一个命令行界面(kedro)。此外,我还想把Python包kedro-docker放到快照中。第二个包扩展了第一个包的命令行界面(kedro docker)。但是当我使用下面的snapcraft.yaml创建快照时,我只得到了第一个包的命令行界面:
name: kedro
base: core18
version: latest
description: |
Kedro is a development workflow framework that implements software
engineering best-practice for data pipelines with an eye towards
productionising machine learning models.
grade: devel
confinement: devmode
architectures:
- build-on: [amd64]
apps:
kedro:
command: kedro
plugs:
- home
- network
- network-bind
- docker
environment: {
LANG: C.UTF-8,
LC_ALL: C.UTF-8
}
parts:
kedro:
plugin: python
python-version: python3
python-packages:
- kedro==0.15.9
- kedro-docker==0.1.1如何将扩展命令行界面(kedro docker)添加到快照中?
发布于 2020-05-02 03:52:11
我不是专家,也从未使用过snapcraft,因此这里只是一个假设。Kedro-Docker只公开特定于项目的命令,除非您位于项目的根目录中,否则这些命令不会出现。因此,如果先运行kedro new,然后运行cd <project-dir> && kedro,您应该(理想情况下)会看到一组docker命令:
Global commands from Kedro
Commands:
docs See the kedro API docs and introductory tutorial.
info Get more information about kedro.
new Create a new kedro project.
Project specific commands from Docker
Commands:
docker Dockerize your Kedro project.
Project specific commands from <project-dir>/kedro_cli.py
Commands:
activate-nbstripout Install the nbstripout git hook to automatically...
build-docs Build the project documentation.
build-reqs Build the project dependency requirements.
install Install project dependencies from both...
ipython Open IPython with project specific variables loaded.
jupyter Open Jupyter Notebook / Lab with project specific...
lint Run flake8, isort and (on Python >=3.6) black.
package Package the project as a Python egg and wheel.
run Run the pipeline.
test Run the test suite.https://stackoverflow.com/questions/61547494
复制相似问题