Skip to content

install

Install 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.

python

python
def python(version: str = "3.9")

Install python.

If install.conda is not used, this will create a solo Python environment. Otherwise, it will be a conda environment.

Arguments:

  • version str - Python version

conda

python
def conda(use_mamba: bool = False)

Install MiniConda or MicroMamba.

Arguments:

  • use_mamba bool - use mamba instead of conda

r_lang

python
def r_lang()

Install R Lang.

julia

python
def julia()

Install Julia.

apt_packages

python
def apt_packages(name: List[str] = [])

Install package using the system package manager (apt on Ubuntu).

Arguments:

  • name List[str] - apt package name list

python_packages

python
def python_packages(name: List[str] = [],
                    requirements: str = "",
                    local_wheels: List[str] = [])

Install python package by pip.

Arguments:

  • name List[str] - package name list
  • requirements str - requirements file path
  • local_wheels List[str] - local wheels (wheel files should be placed under the current directory)

conda_packages

python
def conda_packages(name: List[str] = [],
                   channel: List[str] = [],
                   env_file: str = "")

Install python package by Conda

Arguments:

  • name List[str] - List of package names with optional version assignment, such as ['pytorch', 'tensorflow==1.13.0']
  • channel List[str] - additional channels
  • env_file str - conda env file path

r_packages

python
def r_packages(name: List[str])

Install R packages by R package manager.

Arguments:

  • name List[str] - package name list

julia_packages

python
def julia_packages(name: List[str])

Install Julia packages.

Arguments:

  • name List[str] - List of Julia packages

vscode_extensions

python
def vscode_extensions(name: List[str])

Install VS Code extensions

Arguments:

  • name List[str] - extension names, such as ['ms-python.python']

cuda

python
def cuda(version: str, cudnn: Optional[str] = "8")

Replace the base image with a nvidia/cuda image.

This will replace the default base image to an nvidia/cuda image. You can also use a CUDA base image directly like base(image="nvidia/cuda:12.2.0-devel-ubuntu20.04", dev=True).

Arguments:

  • version str - CUDA version, such as '11.6.2'

  • cudnn optional, str - CUDNN version, such as '8'

    Example usage:

python
install.cuda(version="11.6.2", cudnn="8")

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