__init__ 
Global 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.
base 
python
def base(os: str, language: str, image: Optional[str])Set base image
Arguments:
- osstr - The operating system (i.e.- ubuntu20.04)
- languagestr - The programming language dependency (i.e.- python3.8)
- imageOptional[str] - Custom image (i.e.- python:3.9-slim)
shell 
python
def shell(name: str)Interactive shell
Arguments:
- namestr - shell name (i.e.- zsh,- bash)
run 
python
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:
python
run(commands=["conda install -y -c conda-forge exa"])git_config 
python
def git_config(name: Optional[str] = None,
               email: Optional[str] = None,
               editor: Optional[str] = None)Setup git config
Arguments:
- nameoptional, str - User name
- emailoptional, str - User email
- editoroptional, str - Editor for git operations- Example usage: 
python
git_config(name="My Name", email="my@email.com", editor="vim")include 
python
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: 
python
envd = include("https://github.com/tensorchord/envdlib")
def build():
    base(os="ubuntu20.04", language="python")
    envd.tensorboard(8000)