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.
copy
python
def copy(source: str, target: str, image: Optional[str])Copy from host path to container path (build time)
Arguments:
sourcestr - source path in the host machine or in theimagetargetstr - destination path in the envd containerimage(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:
urlstr - URLchecksumOptional[str] - checksum for the downloaded filefilenameOptional[str] - rewrite the filename