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.

python

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

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

uv

python
def uv(python_version: str = "3.11")

Install UV (an extremely fast Python package and project manager).

uv is much faster than conda. Choose this one instead of conda if you don't need any machine learning packages.

This doesn't support installing Python packages through install.python_packages because that part should be managed by uv. You can run uv sync in the envd environment to install all the dependencies.

Arguments:

  • python_version str - install this Python version through UV

r_lang

python
def r_lang()

Install R Lang.

julia

python
def julia()

Install Julia.

apt_packages

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

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

Arguments:

  • name Sequence[str] - apt package name list

python_packages

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

Install python package by pip.

Arguments:

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

conda_packages

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

Install python package by Conda

Arguments:

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

r_packages

python
def r_packages(name: Sequence[str])

Install R packages by R package manager.

Arguments:

  • name Sequence[str] - package name list

julia_packages

python
def julia_packages(name: Sequence[str])

Install Julia packages.

Arguments:

  • name Sequence[str] - List of Julia packages

vscode_extensions

python
def vscode_extensions(name: Sequence[str])

Install VS Code extensions

Arguments:

  • name Sequence[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-ubuntu22.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.