Introduction

Analysis environments in Mantle empower you to seamlessly perform custom analyses in Jupyter notebooks with all your preferred tools ready to go. Configure your environment with preinstalled packages from pip, conda, and public GitHub repositories. After you set up your environment, it can be used when launching a new analysis notebook so that you can dive straight into exploring your data, without any setup delays. Configuration of an analysis environment also allows you to easily specify the resources allocated to the environment, such as CPU and memory, so you can be sure that your environment will have the resources needed to get insights from your data.

When you create an analysis environment, it comes preloaded with the Mantle SDK and its dependencies, including Pandas and NumPy. The SDK allows you to interact with Mantle’s data and services directly from your notebook. For more information on the SDK, see the SDK guide.

New Environment Configuration

To configure a new analysis environment in Mantle, go to {tenant}.app.mantlebio.com/analyses and click the New Notebook Environment button.

A form will appear with the following fields to fill out:

Environment Name
required

The name of the environment. This will be the name that is displayed in the UI. The name should be unique and can contain only letters, numbers, and dashes.

CPU

The CPU capacity that will be allocated to the environment, specified in vCPU. This field is optional and if not specified, a default of 1 vCPU will be used. Note that that there are limitations on the allowable CPU and Memory combinations. See the section on Resource Configuration for more information.

Memory

The amount of memory that will be allocated to the environment, specified in GB. This field is optional if the default CPU configuration is used and if not specified, a default of 2GB will be used. Note that that there are limitations on the allowable CPU and Memory combinations. See the section on Resource Configuration for more information.

Pip Packages

A list of pip packages that will be installed in the environment. This field is optional. To add a package, click the Add Pip Package button and enter the name of the package in the Package Name text box that appears. To remove a package, click the x button next to the package field of the package you wish to remove. Optionally, a version of the package can be specified by filling out the Package Version field.

Conda Packages

A list of conda packages that will be installed in the environment. This field is optional. To add a package click the Add Conda Package button and enter the name of the package in the Package Name text box that appears. To remove a package, click the x button next to the package field of the pacakge you wish to remove. Optionally a version of the package can be specified by filling out the Package Version field.

GitHub Repositories

A list of GitHub repositories that will be cloned into the environment. This field is optional. To add a repository, click the Add GitHub Repository button and enter the URL of the repository in the text box that appears. To remove a repository, click the x button next to the repository name field of the repository you wish to remove.

Once you have added your desired configurations, click Create at the bottom of the page.

Note: If you navigate away from the form before clicking Create, you will lose your configuration and will need to start over.

Create New Version of an Existing Environment

Sometimes, you may want to create a new version of an existing environment. This can be useful if you want to make changes to an existing environment, such as adding new packages or updating versions of existing packages. You also may want to increase memory or CPU resources allocated to the environment. Creating a new environment version allows you to do this while preserving previous versions of the environment that are in use.

To create a new version of an existing environment, go to {tenant}.app.mantlebio.com/analyses/environments/{environment_name}, where environment name is the name of the environment you would like to make a new version for. In the header section of the page you will see a dropdown menu that shows the existing versions of the enviroment. Click the + button located to the right of the dropdown menu to create a new version of the environment.

A form will appear with the following fields to fill out:

Environment Name
required

This field will be locked and set to the name of the environment you are creating a new version for.

Version
required

This Version number string representing the sematic version of the environment. This field will be prepopulated with the next semantic version number patch, but can be adjusted depending on how you want to version the environment.

CPU

The CPU capacity that will be allocated to the environment, specified in vCPU. This field is optional and will come prepopulated with the value set for the latest version of the environment. Note that that there are limitations on the allowable CPU and Memory combinations. See the section on Resource Configuration for more information.

Memory

The amount of memory that will be allocated to the environment, specified in GB. This field is optional and will come prepopulated with the value set for the latest version of the environment. Note that that there are limitations on the allowable CPU and Memory combinations. See the section on Resource Configuration for more information.

Pip Packages

A list of pip packages that will be installed in the environment. This field is optional. This will be prepopulated with the pip packages added to the latest version of the environment. To add a package, click the Add Pip Package button and enter the name of the package in the Package Name text box that appears. To remove a package, click the x button next to the package field of the package you wish to remove. Optionally, a version of the package can be specified by filling out the Package Version field.

Conda Packages

A list of conda packages that will be installed in the environment. This field is optional. This will be prepopulated with the conda pacakges added to the latest version of the environment. To add a package click the Add Conda Package button and enter the name of the package in the Package Name text box that appears. To remove a package, click the x button next to the package field of the pacakge you wish to remove. Optionally a version of the package can be specified by filling out the Package Version field.

GitHub Repositories

A list of GitHub repositories that will be cloned into the environment. This field is optional. This will be prepopulated with the github repositories added to the latest version of the environment. To add a repository, click the Add GitHub Repository button and enter the URL of the repository in the text box that appears. To remove a repository, click the x button next to the repository name field of the repository you wish to remove.

Resource Configuration

When configuring a Notebook Environment, you can specify the CPU and memory that will be allocated to the environment. The following table shows the allowable CPU and Memory combinations that can be used:

CPUMemory
256 (0.25 vCPU)0.5 GB, 1 GB, 2 GB
512 (0.5 vCPU)1 GB, 2 GB, 3 GB, 4 GB
1024 (1 vCPU)2 GB, 3 GB, 4 GB, 5 GB, 6 GB, 7 GB, 8 GB
2048 (2 vCPU)Between 4 GB and 16 GB in 1 GB increments
4096 (4 vCPU)Between 8 GB and 32 GB in 1 GB increments