Skip to main content

🏡 Environments

Using Jarvislabs you can create one of the below instances

  • PyTorch
  • FastAI
  • Tensorflow

To make lives easier, we have installed and update the latest version of the softwares from time to time. As your projects get complicated, you may want to create and maintain seperate environments. You can create new environments using

  • conda
  • pyenv
info

Choose BYOC, When you want full control of instance. It is mostly suited for advanced users as you have to SSH and start JupyterLab by yourself.

Creating and manage a new environment using conda

Create a new environment

Lets create a new environment with python 3.9

conda create --prefix </path/yourEnvName> <python-version>

Example:

conda create --prefix /home/python3.9 python=3.9 ipykernel mamba -y

The prefix option --prefix /home/python3.9 lets you choose the path and the installations done in the /home directory are available when you pause and resume an instance.

info

If you do not choose --prefix and create an environment then it gets installed in the /root location which gets reset when you pause and resume an instance.

Activate the new conda environment

To install any new libraries in the environment, we need to activate the environment. You can activate the environment by

conda activate /home/python3.9/

If you get any errors while activating, then try these commands from a terminal

conda init bash
source .bashrc

Start a new kernel from JupyterLab

If you want to use the new environment from the JupyterLab, you need to setup the kernel.

conda activate /home/python3.9/
python -m ipykernel install --user --name=python3.9

Once you refresh your JupyterLab, you can now create a notebook with new conda environment.

Jarvislabs.ai Launch