Conda Installation¶
Note
If you have already retrieved your Personal Access Token and set your License Key as an environment variable, skip ahead to Step Three.
1. Access Latent AI's Container Repository¶
In order to pull containers or install packages from Latent AI, you'll need to create a personal access token. To do so, follow these steps:
i. Login to the Latent AI Repository¶
- Click the
Sign in
link in the upper right. - Select
Sign In with SSO
. - Enter your access credentials.
ii. Create your Personal Access Token¶
- Click on your profile in the upper right.
- Select
User Token
on the left navigation. - Select the
Access user token
button. - View your user token name and user token pass code.
You can export the token name and token pass code as environment variables:
export REPOSITORY_TOKEN_NAME=<user_token_name>
export REPOSITORY_TOKEN_PASSCODE=<user_token_pass_code>
2. Export License Key¶
You should have received this via email.
Tip
You can persist variables like LICENSE_KEY
across bash
sessions by placing them in your ~/.bashrc
file.
export LICENSE_KEY=key/<license_key>
3. Create a conda environment¶
For Advanced Users
The conda setup is intended for advanced users. Please consult the conda documentation for details on installing conda and creating a conda environment from an environment.yml
file.
You can use the provided YAML as a template to create variants for different version of Python; just edit the YAML directly. Please note, however, that Python versions are constrained and must be within 3.8-3.11 majors.
You can copy or download the following environment.yml
to create a conda environment:
name: latentai-forge
channels:
- nvidia/label/cuda-12.1.0
- conda-forge
- defaults
dependencies:
- jupyter
- libstdcxx-ng
- nvidia::cuda-tools
- python=3.10
- pip
- pip:
- --extra-index-url https://${REPOSITORY_TOKEN_NAME}:${REPOSITORY_TOKEN_PASSCODE}@repository.latentai.com/repository/pypi/simple
- leip-forge
Then create the environment with the following command:
conda env create -f environment.yml
And then activate the environment:
conda activate latentai-forge
Troubleshooting¶
The above script will try to handle most of the environment setup but it won't be able to account for all dependencies. Below are a list of software requirements.
-
GLIBCXX_3.4.30
: When Jupyter notebook is installed, you’ll have GLIBCXX_3.4.29.Solution:
conda upgrade -c conda-forge libstdcxx-ng
-
nvcc
: Only applicable for GPU-machines. To check ifnvcc
exists, the following command should return the version if it's installed:nvcc -V
. Note thatnvcc
version must be ≤ 12.1 if one wishes to execute compiled models on Jetpack 5.X devices.Solution 1:
conda install nvidia::cuda-nvcc
Solution 2:
conda install nvidia::cuda-tools
-
g++-aarch64-linux-gnu
: The cross-compiler for ARM chips cannot be installed via conda.Solution:
sudo apt-get update && sudo apt-get install -y g++-aarch64-linux-gnu