__init__ 
v1 syntax
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.
base 
def base(image: str = "ubuntu:20.04", dev: bool = False)Set up the base env.
Arguments:
- imagestr - docker image, can be any Debian-based image
- devbool - enabling the dev env will add lots of development related libraries like envd-sshd, vim, git, shell prompt, vscode extensions, etc.
shell 
def shell(name: str = "bash")Interactive shell
Arguments:
- namestr - shell name (i.e.- zsh,- bash)
run 
def run(commands: List[str], mount_host: bool = False)Execute command
Arguments:
- commandsList[str] - command to run during the building process
- mount_hostbool - mount the host directory. Default is False. Enabling this will disable the build cache for this operation.
Example:
run(commands=["conda install -y -c conda-forge exa"])git_config 
def git_config(name: Optional[str] = None,
               email: Optional[str] = None,
               editor: Optional[str] = None)Setup git config.
Arguments:
- namestr - User name
- emailstr - User email
- editorstr - Editor for git operations- Example usage: 
git_config(name="My Name", email="my@email.com", editor="vim")include 
def include(git: str)Import from another git repo
This will pull the git repo and execute all the envd files. The return value will be a module contains all the variables/functions defined (except the ones with _ prefix).
Arguments:
- gitstr - git URL- Example usage: 
envd = include("https://github.com/tensorchord/envdlib")
def build():
    base(os="ubuntu20.04", language="python")
    envd.tensorboard(host_port=8000)