Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example(runtime): remove example and doc for the unsupported pre/post runtime hook #1802

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ dependencies:
- files:
- dest: bin/prepare.sh
name: prepare
post: bash bin/prepare.sh
pre: ls bin/prepare.sh
src: scripts/prepare.sh
- requirements-sw-lock.txt
environment:
Expand Down Expand Up @@ -211,15 +209,13 @@ dependencies:
- test.whl
```

包含文件、库等,会一同进行打包,并按照设置放置到特定位置,并支持pre和post两个hook,可以执行一些命令。通常应用在Runtime中包含一些非Python的包时使用。
包含文件、库等,会一同进行打包,并按照设置放置到特定位置。通常应用在Runtime中包含一些非Python的包时使用。

```yaml
dependencies:
- files:
- dest: bin/prepare.sh # 目标位置。若是相对路径,则存放在 workdir/export/[conda/venv] 目录的相对位置。若是绝对路径,当在docker环境中restore runtime,则按照预期拷贝到目标目录;非docker环境restore runtime,则存放在workdir/export/[conda/venv] 目录的相对位置。workdir是restore runtime时解压的目标目录。
name: prepare # required
post: bash bin/prepare.sh # 拷贝资源之后执行的命令, optional
pre: ls bin/prepare.sh # 拷贝之前执行的命令,optional
src: scripts/prepare.sh # 相对runtime.yaml所在目录(workdir)的相对路径,支持文件或目录,若目录则会递归拷贝,required
```

Expand Down
2 changes: 0 additions & 2 deletions example/runtime/pytorch/runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ dependencies:
- files:
- dest: bin/prepare.sh
name: prepare
post: bash bin/prepare.sh
pre: ls bin/prepare.sh
src: scripts/prepare.sh
environment:
arch: noarch
Expand Down