Creating a Custom Conda Environment

Create a custom conda environments with a conda compatible environment file (environment.yaml) using the odsc conda create command.

By default, the create option also installs additional libraries to ensure that the conda environment is compatible with JupyterLab and the OCI services. The most important libraries that are added are oci, ipykernel, jupyterlab, nb_conda_kernels, and cx_oracle. You can overwrite this default behavior by adding the optional argument --empty, -e then no extra libraries are added to your conda environment.

Note

We strongly recommend that you don't use the --empty argument. Because the conda environment that you create might not be accessible as a kernel in JupyterLab.

You can create a conda environment from a conda compatible environment file with:

odsc conda create -n <name> -v <version> -f <environment.yaml> 

If you want to create the environment from an empty base, use the --empty optional argument:

odsc conda create -n <name> -v <version> -f <environment.yaml> --empty 

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 workloads in OCI, you can use Anaconda while running workloads in 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 a 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. Preinstalled packages that are embedded in OCI products and services that you license from Oracle might 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 can 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 might have their own licenses provided by the package authors.

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