Copying a Conda Environment to Another Region
In this tutorial, you install a conda environment in a notebook session. Then you perform the necessary steps to install the same conda environment in a second notebook session hosted in a different region.
Key tasks include how to:
- Create two buckets in two different regions in your tenancy.
- Register each bucket with a notebook session in their region.
- Install a conda environment in the first notebook session.
- Publish the conda environment. (Make the conda environment ready to be installed from any notebook session that has access to the environment.)
- From the first notebook session, add the published conda environment to a bucket of the same region.
- Copy the published conda environment from one bucket to another.
- In a notebook session in the second region, install the conda environment, by using the second bucket.
For additional information, see:
Before You Begin
To successfully perform this tutorial, you must have the following:
-
A paid Oracle Cloud Infrastructure (OCI) account, or a new account with Oracle Cloud promotions. See Request and Manage Free Oracle Cloud Promotions.
- A MacOS, Linux, or Windows computer.
- Data Science tutorial:
- Go through all the steps in Manually Configuring a Data Science Tenancy and
create two notebook sessions with the
following properties:
- Name the compartment for your work data-science-work.
- Create notebook sessions in two regions:
- To change your region, in the Console's top navigation bar, click your region and then click the name of a new region. For example, switch from US West (Phoenix) to US East (Ashburn).
- Name your projects and notebook sessions:
- In <region-1>: Initial Project and my-first-notebook-session
- In <region-2>: Second Project and my-second-notebook-session
- Go through all the steps in Manually Configuring a Data Science Tenancy and
create two notebook sessions with the
following properties:
1. Create Buckets
Create two buckets to store conda environments of my-first-notebook-session and my-second-notebook-session.
Create a bucket in <region-1> and another one in <region-2>.
Every tenancy has a unique system-generated immutable Object Storage namespace name. This namespace name is the same in all regions. In this step, you copy this namespace name and later use it to register your buckets with your notebook sessions.
2. Publish a Conda Environment in Region 1
Install a conda environment in your notebook session. Then from the notebook session, publish the conda environment to a bucket.
Register bucket-1 with my-first-notebook-session.
Install a prebuilt Data Science conda environment in your notebook session.
Publish the conda environment in a bucket registered with the notebook session.
3. Copy the Bucket to Region 2
Copy your published conda environment from bucket-1 to bucket-2.
Your published conda environment is stored as an object in bucket-1. Copy this object to bucket-2.
Verify that your published conda environment is stored as an object in bucket-2.
- In the top navigation bar, select <region-2>. For example, US East (Ashburn).
- Click bucket-2.
- Under Objects, expand conda_environments, cpu, ONNX 1.10 for CPU on Python 3.9, and 1.0 to get to onnx110_p39_cpu_v1.
4. Install the Conda Environment in Region 2
Register bucket-2 to a notebook session in the second region. Then install and view the conda environment in the notebook session.
Register bucket-2 with my-second-notebook-session in <region-2>.
View the copied conda environment in your second notebook session.
What's Next
You have successfully copied a conda environment from one region to another, and used it in a notebook session in the second region.
To learn more about conda environments, in your notebook session:
- In the Launcher, under Extenstions, click the Notebook Explorer icon. Select ONNX Integration with the Accelerated Data Science (ADS) SDK, click Open, and explore the examples.
- Go to Environment Explorer and install other prebuilt Data Science conda environments, not mentioned in this tutorial.