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
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
def conda(use_mamba: bool = False)
Install MiniConda or MicroMamba.
Arguments:
use_mamba
bool - use mamba instead of conda
r_lang
def r_lang()
Install R Lang.
julia
def julia()
Install Julia.
apt_packages
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
def python_packages(name: List[str] = [],
requirements: str = "",
local_wheels: List[str] = [])
Install python package by pip.
Arguments:
name
List[str] - package name listrequirements
str - requirements file pathlocal_wheels
List[str] - local wheels (wheel files should be placed under the current directory)
conda_packages
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 channelsenv_file
str - conda env file path
r_packages
def r_packages(name: List[str])
Install R packages by R package manager.
Arguments:
name
List[str] - package name list
julia_packages
def julia_packages(name: List[str])
Install Julia packages.
Arguments:
name
List[str] - List of Julia packages
vscode_extensions
def vscode_extensions(name: List[str])
Install VS Code extensions
Arguments:
name
List[str] - extension names, such as ['ms-python.python']
cuda
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:
install.cuda(version="11.6.2", cudnn="8")