Skip to content

io

IO functions

TIP

Note that the documentation is automatically generated from envd/api folder in tensorchord/envd repo. Please update the python file there instead of directly editing file inside envd-docs repo.

WARNING

Enable v1 by adding # syntax=v1 to the 1st line of your envd file.

v1 is experimental and may change in the future. Make sure to freeze the envd version for online CI/CD.

copy

python
def copy(source: str, target: str, image: Optional[str])

Copy from host path to container path (build time)

Arguments:

  • source str - source path in the host machine or in the image
  • target str - destination path in the envd container
  • image(Optional[str]) - image name, if not specified, will use the host

Examples:

python
# copy from host to container
io.copy(source='main.py', target='/home/envd/')
# copy from image to container
io.copy(source='/bin/micromamba', target='/usr/local/bin/micromamba', image='mambaorg/micromamba:1.0.0')

http

python
def http(url: str, checksum: Optional[str], filename: Optional[str])

Download file with HTTP to /home/envd/extra_source

Arguments:

  • url str - URL
  • checksum Optional[str] - checksum for the downloaded file
  • filename Optional[str] - rewrite the filename

Released under the Apache-2.0 License. Built with VitePress.