About Conda Environments

We recommend that you use conda environments to package your Python dependencies inside your notebook sessions. Each conda environment that you create in your notebook session can correspond to a different notebook kernel in JupyterLab. Conda environments allow you to run notebooks in different kernels. Each kernel has a set of Python libraries associated with it. The base install has a very minimal set of libraries installed. The service is designed to use conda environments.

The notebook session environment includes the odsc conda CLI tool and the conda Environment Explorer.

The odsc conda CLI tool allows you to install, browse, search, and publish conda environments. You can access the odsc conda CLI documentation by executing odsc conda -h in a terminal window tab of your notebook session.

The Environment Explorer in JupyterLab helps you browse and search conda environments.

Although the conda CLI is available in a notebook session, we recommend that you use odsc conda to browse, install, clone, publish, and delete conda environments. It is preinstalled in notebook sessions and is available in a terminal window tab. The odsc conda CLI installs the necessary dependencies in your conda to make it available as a kernel in JupyterLab and creates the required manifest file that is necessary for each conda environment.

The Python3 conda environment is preinstalled in the notebook session. This conda environment is a Python 3 based conda environment and has a minimal set of libraries installed. We recommend that you install at least one Data Science conda environment or create your own.

Important

To ensure that conda environments can be listed in your notebook sessions or used in your jobs:
  • Either use the default networking option when you create your notebook sessions or jobs, and no other setup is needed.
  • Or if you decide to use the custom networking option of notebook sessions or jobs, then set up your VCN and subnet to route traffic through either the NAT gateway or the service gateway of the VCN.

    See notebook sessions or jobs for networking options.

Using the Anaconda Technology on OCI

To start using Anaconda in OCI Data Science, build or customize your own conda environment.

Following the partnership announcement between Oracle and Anaconda , means that while running your workloads on OCI, you can use Anaconda while running your workloads on OCI. You can use the Anaconda repository of packages without purchasing a separate license from Anaconda. Anaconda is the standard distribution channel for open source software in machine learning and AI services.

You can use the Anaconda repository of packages by adding anaconda or main as the first channel listed in your conda compatible environment file (environment.yaml).

This sample environment.yaml file prioritizes anaconda over the community driven conda-forge channel:

channels: 
  - anaconda
  - conda-forge
dependencies: 
  - keras 
  - tensorflow

After you've created the conda environment, you can inspect the list of packages that were installed in the conda environment by running this command in a terminal window or in a notebook running inside the conda environment kernel:

conda list 

Following is a sample output of the conda list command:


    Name                    Version                   Build  Channel
    absl-py                   0.15.0             pyhd3eb1b0_0    anaconda
    aiohttp                   3.8.1            py38h7f8727e_1    anaconda
    aiosignal                 1.2.0              pyhd3eb1b0_0    anaconda
    argon2-cffi               21.3.0             pyhd3eb1b0_0    anaconda
    argon2-cffi-bindings      21.2.0           py38h7f8727e_0    anaconda
    arrow                     1.2.3                    pypi_0    pypi
    astor                     0.8.1            py38h06a4308_0    anaconda

The channel column in the response lists the source channel of the Python library that was installed in the environment. In this example, you can see that most packages were installed from anaconda.

For more details about the Anaconda Repository and why Anaconda is the recommended option to download open-source packages, watch how to seamlessly leverage Anaconda on OCI presented by the Oracle Developers.

Important

Oracle is licensed to include packages from Anaconda and make these packages available to OCI customers. Pre-installed packages that are embedded in OCI products and services that you license from Oracle may be used under the terms of the applicable Oracle OCI license agreement or terms of service.

You can use Oracle’s cloud-hosted products and services with a preinstalled copy of Conda to access additional packages from Anaconda’s repository. This access is under the Anaconda's Terms of Service, except that Oracle OCI customers may use the Anaconda packages for commercial purposes on the OCI platform without obtaining a separate paid license from Anaconda. The packages are only for use as part of our services and don't entitle you to download them to your own infrastructure or to use Anaconda’s trademarks. Packages may have their own licenses provided by the package authors.

Create an account on Anaconda Nucleus and to get started using Anaconda.