Learn how to create, configure, access, stop, restart, and delete AI Notebooks.
A Notebook is a document that integrates code, rich text elements, and multimedia, making it a convenient tool for data analysis, visualization, and Machine Learning tasks.
OVHcloud AI Notebooks is our managed solution for Jupyter and VSCode Notebooks. You can easily launch Notebooks with the required CPU and GPU resources while enjoying benefits like pre-installed dependencies and AI frameworks (e.g., TensorFlow, PyTorch, Hugging Face, Scikit-learn, etc.), secure user access, and simplified data management.
The advantage compared to doing your own setup is that everything is already installed for you, and that you pay only for your AI Notebooks while they are running.
Requirements
- A Public Cloud project in your OVHcloud account
- Access to the OVHcloud Control Panel
- A Public Cloud user with
Administrator
orAI Training Operator & Objectstore Operator
roles (see this guide for more information)
Instructions
We highly recommend creating your first AI notebook using the OVHcloud Control Panel (UI). This method is user-friendly and ideal for beginners.
However, you can also choose to utilize one of the three alternative methods:
- The ovhai command-line interface (CLI)
- The AI API
- The ovhai Python SDK
Each method offers distinct advantages, depending on your expertise and preferred workflow.
OVHcloud AI Solutions Authorization Process
Select the tab for the method you have chosen.
If you are using the UI, this step is not required. You can directly proceed to the next step, which is creating a Notebook.
If you already have created an AI Notebook using the Control Panel (UI) on this Public Cloud project, you can directly go to the next step Launch your first AI Notebook.
However, if this is the first time you are using the AI Products on your Public Cloud project, you will need to complete an authorization process before using the AI API, ovhai CLI, or Python SDK. To do so, please follow these steps:
Log in to the OVHcloud Control Panel, and navigate to the AI Notebooks
section via the Public Cloud
menu.
From there, click the Create a Notebook
button. The authorization process will take place silently in the background.
Once you have clicked this button, you can leave this page and continue to follow this documentation to launch your AI Notebook using the CLI, API, or SDK. You do not need to complete the entire Notebook creation process in the Control Panel. Clicking the Create a Notebook
button is sufficient.
Launch your first AI Notebook
Select the tab for the method you have chosen.
Log in to the OVHcloud Control Panel and navigate to the AI Notebooks
section via the Public Cloud
menu and click Create a Notebook
.
Once you have clicked this button, you will be prompted to provide some information to specify the configuration of your AI Notebook (code editor, pre-installed framework, compute resources, etc.).
Notebook name
First, give a name to your AI Notebook. This will make it easier to manage when you have multiple AI Notebooks created.
Location
Next, select a location for your new cluster.
Resources
Specify and adjust the type and amount of computing resources (CPU / GPU) for your AI Notebook. You can also customize the quantity of resources depending on your needs.
Frameworks
Then, choose the AI framework you want to use, which will be pre-installed and ready to use when your AI Notebook is launched. A wide range of Machine Learning frameworks are available, in different versions. Select the version that suits your needs. This guide will use PyTorch as an example.
Editors
Choose the code editor you want.
In this example, we use JupyterLab, but you have the option to choose Visual Studio Code as well. Both of them have their own pros and cons. Jupyter Notebook is generally considered easier to use for beginners.
Confidentiality
Next, select your privacy settings and click the Next
button.
NOTE: Public access will expose your data and code to anyone getting the AI Notebook link. Be careful and don't use it with sensitive data. On the other hand, Restricted access will ask for a user and password combination or an AI token to access the Notebook content, ensuring a secure environment.
Advanced configuration
Volumes
By default, your AI Notebook comes with ephemeral storage (local storage). But in this step, you can also link Object Storage containers and Git repositories to your AI Notebook, to easily access your remote data.
If you want to learn more about configuring containers and Git repositories in the Notebook, you can refer to this documentation. For now, we will launch a classic Notebook without any external volumes added to it.
Labels
You have the option to set labels. This allows you to specify one of your AI tokens and apply it to this new AI Notebook. This AI token can then be shared with anyone who should have access to the Notebook, allowing them to access it without requiring your own Public Cloud project credentials. This is useful if you want to provide access to the AI Notebook outside your Public Cloud project. More information here.
SSH Public Keys
SSH public keys allow you to access your Notebook remotely. This section is optional.
Review and launch your AI Notebook
At the end of the process, review your settings and click the Order now
button to confirm and start the creation of your Notebook.
At the bottom of the summary panel, the CLI equivalent
link gives you the equivalent ovhai CLI command that allows you to run the exact same Notebook using the CLI.
When your notebook is created, it will appear on your AI Notebooks tab.
If you prefer to use the command line interface to launch your AI Notebook, please follow these steps:
First, you will need to install the ovhai CLI and log into it. Please follow this documentation.
After installation and successful login, visit this second documentation to learn how to create your AI Notebook using commands.
To create an AI Notebook using the OVHcloud AI API, follow these steps:
First, navigate to the AI API link for the desired region among the ones that are available for the AI Products usage:
- US-EAST-VA AI API, for Vint Hill, Virginia.
Upon visiting the API URL, you will notice various endpoint categories on the left side of the screen. Click the Notebook
category to display the endpoints related to AI Notebooks.
Among them, you will find a Submit a new notebook
POST method. This is the endpoint for submitting a new AI Notebook.
The exact link for this endpoint in the US-EAST-VA region is as follows: https://us-east-va.ai.cloud.ovh.us/#/operations/notebookNew
.
In the Submit a new notebook
endpoint page, you will find the detailed schema for the Notebook Specification
and its various possible parameters. Examples of responses (200
, 400
, 401
, 402
, 403
) are also provided in case of success or different error scenarios.
Before using this method to create an AI Notebook, you will need to authenticate. This can be done by providing a bearer token, which you can create through the AI Dashboard or by using the ovhai CLI. For more detailed instructions on creating a token, please consult the Manage access tokens documentation.
Once you have created your token, provide your token in the 'Auth' panel, on the right-hand corner of the API page.
NOTE: Make sure to select Bearer Auth
instead of OAuth 2.0
, which is selected by default.
After logging in, you may modify the body (Notebook specifications) for the AI Notebook you wish to create. A default example is provided. Feel free to adjust it.
Once your body is filled, click the Send API request
button. If your body is correctly written, the Notebook will be created on the Public Cloud project from which the bearer token used for identification originates. You will receive all the necessary information about the created Notebook (ID
, access URL
, etc.) in the Responses
field.
In addition to the API interface, the API provides Python code examples to help you use the endpoint and reproduce the same result programmatically. However, for an efficient Python experience, we recommend using the ovhai Python SDK.
The ovhai library is a Python client that allows developers to easily use the OVHcloud AI API. With this SDK, you can run, manage, and automate your AI Notebooks.
Alpha Warning: This package is currently in the alpha phase of development. The APIs and functionalities of the package may not be fully tested.
To launch an AI Notebook using the ovhai Python SDK, you first need to install the ovhai library. You can do this using pip
. Open your terminal and run the following command:
Once installed, we invite you to follow the instructions provided in the ovhai PyPI page to learn how to create a token for authentication, understand the SDK's functionality, and launch an AI Notebook using the ovhai Python SDK.
Here is a basic example of how to do it, making it easy for you to get started:
Please make sure to replace YOUR_AI_TOKEN
with a bearer token. Bearer tokens can be created through the AI Dashboard or by using the ovhai CLI. For more detailed instructions on creating a token, please consult the Manage access tokens documentation.
Running this code will launch a new AI Notebook based on the specifications you provided. Feel free to adjust the specifications based on the Notebook you want to create.
Accessing your AI Notebook
At this point, your AI Notebook is created. You will need to wait a few seconds for the Notebook to start and reach the RUNNING
status. Once it has, the Notebook URL will be accessible.
Select the tab for the method you have chosen.
You can access your Notebook by clicking the Jupyterlab
link, from the AI Notebooks board, in the Publisher column:
This Open Jupyterlab
button can also be accessed from the dedicated Notebook page, which can be reached by clicking the Notebook name in the AI Notebooks service list.
On your Notebook page, you will find a lot of information about your Notebook (specifications, billing, attached data, etc.). There is also a monitoring URL, which allows you to view real-time metrics for your Notebook, such as the GPU average usage for example.
In the previous step, you ordered the creation of your Notebook. This should have displayed the URL
of your Notebook in your terminal, allowing you to access it:
If you no longer have the Notebook UUID
and URL
displayed in your terminal, you can easily list all your existing AI Notebooks by running:
This will allow you to retrieve the URL
of the Notebook you want to access.
You can also get all the information related to a Notebook (Specifications, Access Url, Monitoring URL, ...) by running:
Just make sure to replace the <NOTEBOOK_UUID>
with the actual UUID
of the Notebook you want to retrieve the information for.
In the previous step, you ordered the creation of your Notebook. This should have displayed the URL
of your Notebook in the 'Response' panel, allowing you to access it:
If you no longer have the Notebook UUID
and URL
displayed on the API page, you can list all your AI Notebooks by using the Paginated list of notebooks
GET endpoint method, in the Notebook
category.
This will allow you to retrieve the URL
of the Notebook you want to access.
You can also get all the information related to a Notebook (Specifications, Access Url, Monitoring URL, ...) by using the Get notebook information
GET endpoint method. You will just have to provide the UUID
of the notebook from which you want to obtain information.
If you no longer have the Notebook UUID
and URL
displayed in your Python IDE, you can easily list all your AI Notebooks by running:
This will allow you to retrieve the URL
of the Notebook you want to access. Just make sure you are using the right API url, and replace YOUR_AI_TOKEN
with your actual AI token.
You can also get all the information related to a Notebook (Specifications, Access Url, Monitoring URL, ...) by running the following code:
Connecting to your AI Notebook
Once you have clicked on the Notebook URL
, you will be redirected to the corresponding Notebook page. For restricted access Notebooks, you will need to authenticate to ensure you have the required rights for accessing it.
For public access Notebooks, no authentication will be needed, so you will directly land on the notebook with your data and code exposed.
There are two methods of authentication for a restricted Notebook: using a username and password combination or using an access token.
Select the tab for the method you have chosen.
To authenticate using a username and password, please follow these steps:
Enter one of your Public Cloud project user's username and password in the respective fields, as shown in the screenshot below. The user needs to belong to the same Public Cloud project you used to create the Notebook and must have sufficient permissions.
If you have not yet created a Public Cloud user for your project, or require more information on how to do so, please refer to the following guide.
Once you have entered your username and password, click the Connect
button to log in to your AI Notebook.
Using a token is an effective way to share the AI Notebook with anyone, without requiring them to have the credentials of one of your Public Cloud project users. This is useful when you want to provide access to the Notebook outside your Public Cloud project.
To authenticate using an access token, please follow these steps:
Click the Login with token
button, located below the user and password fields. This will switch the access mode to use a token-based authentication method instead.
Make sure to use a token that you have created either from the AI Dashboard or from the ovhai CLI, API, or SDK. You can use tokens that were created without a label selector. If you specified a label selector during the Notebook creation, you can also use the token that matches the label selector specified. For more information on how to create an access token, please refer to this documentation.
Enter the access token in the 'Access Token' field, as shown in the screenshot below.
Click the Connect
button to log in to your AI Notebook.
Once you have successfully reached JupyterLab, you can create your first Notebook by clicking on the Pytorch 2.1.0
button (or a similar button name depending on the framework you have selected).
With your new Notebook open, enter some Python code in the first code cell. We can test it with a simple Hello World :
To execute the code, simply press the ▶️
located in the toolbar above the code cell. You should then see the output:
Alternatively, you can use the keyboard shortcut Ctrl+Enter
, or CMD+Enter
, to save the Notebook quickly.
Your code is executed in your browser and will consume the CPU and GPU resources linked to your AI Notebook.
To save your Notebook, click on the sub-menu Save
of the File
menu. Alternatively, you can use the keyboard shortcut Ctrl+S
, or CMD+S
, to save the Notebook quickly.
Stop an AI Notebook
You can stop your AI Notebook at any time. This will release its compute resources but will keep your Notebook data and installed libraries. Therefore, you will not incur any further charges for compute unless you restart the Notebook. However, attached storage will be billed at the price of OVHcloud Object Storage. Consult the AI Notebooks Billing documentation for more information.
Indeed, when you stop a Notebook, it will be unavailable for a certain period while your data is synchronized to the Object Storage so that you can retrieve your work later. Once the synchronization is complete, the Notebook will reach the STOPPED
state, at which point you can either start it again or delete it.
Select the tab for the method you have chosen.
Go back to the AI Notebooks
board, from the Public Cloud
section of the OVHcloud Control Panel.
Then, select the Notebook you want to stop by clicking on its Name
.
From there, you will be able to click the Stop 🛑
button.
You can easily stop your Notebook using the following command:
Make sure to replace <NOTEBOOK_UUID>
with the Notebook UUID you want to stop.
If you do not know its UUID, remember that you can easily list all your existing AI Notebooks by running:
Select the Stop a running notebook
endpoint, which is a PUT method. Provide the UUID of the Notebook you wish to stop as an input parameter. Then, click the Send API request
button to send the request.
If the request is successful, the Notebook will be stopped and a 'No content' message will be displayed in the 'Response' panel. If the request is unsuccessful, an error message will be displayed there.
Here is an example of how to stop a running Notebook using the Python SDK:
Please replace YOUR_AI_TOKEN
with your actual AI token and YOUR_NOTEBOOK_UUID
with the UUID
of the Notebook you want to stop.
Restarting a stopped Notebook
Once the Notebook has reached the Stopped
state, you may be interested in restarting it to continue your work.
Select the tab for the method you have chosen.
Go back to the AI Notebooks
board, from the Public Cloud
section of the OVHcloud Control Panel.
Then, select the Notebook you want to restart by clicking on its Name
.
From there, you will be able to click the Start ▶️
button.
Use the following command and replace <NOTEBOOK_UUID>
with your Notebook UUID to restart your stopped Notebook:
Select the Start a stopped notebook
endpoint, which is a PUT method. Provide the UUID of the Notebook you wish to restart as an input parameter. Then, click the Send API request
button to send the request.
If the request is successful, the Notebook will be restarted and a 'No content' message will be displayed in the 'Response' panel. If the request is unsuccessful, an error message will be displayed there.
Here is an example of how to stop a running Notebook using the Python SDK:
Please replace YOUR_AI_TOKEN
with your actual AI token and YOUR_NOTEBOOK_UUID
with the UUID
of the Notebook you want to stop.
Restarting a Notebook will transition its state to RUNNING
, once the Notebook is restarted. However, there will be a short waiting period while your data synchronizes back to your Notebook. During this data synchronization, the Notebook's state will display as Pending
or Starting
before entering the RUNNING
state.
Deleting a Notebook
If you no longer need your Notebook, you can delete it.
Deleting a Notebook also means that you will delete the Notebook's local storage. This data cannot be recovered once the Notebook has been deleted. However, any remote Object Storage that was mounted on the AI Notebook during its creation will not be deleted.
Select the tab for the method you have chosen.
If you want to completely delete your AI Notebook, scroll to the bottom of the Dashboard select Delete notebook
.
If you want to completely delete your AI Notebook, just run the following command:
If the Notebook is still RUNNING
, a confirmation message will appear, asking you to confirm the action. Confirm only if you're sure you want to delete the Notebook.
Select the Delete permanently a notebook
endpoint, which is a DELETE method. Provide the UUID of the Notebook you wish to delete. Use the force
parameter if your Notebook is not STOPPED
and still RUNNING
. Then, click the Send API request
button to send the request.
If the request is successful, the Notebook will be restarted and a 'No content' message will be displayed in the 'Response' panel. If the request is unsuccessful, an error message will be displayed there.
Here is an example of how to delete a Notebook using the Python SDK:
Please replace YOUR_AI_TOKEN
with your actual AI token and YOUR_NOTEBOOK_UUID
with the UUID
of the Notebook you want to delete. If the Notebook is still RUNNING
, you will need to set the force
parameter to True
to delete the Notebook.
Once the AI Notebook has been deleted, you should no longer see it when listing your existing AI Notebooks.
Go further
-
Discover how to access your Object Storage data and Git repositories from your Notebooks using the UI here.
-
To learn about the technical features, capabilities, and limitations of the Public Cloud AI Notebooks offer, explore this guide.
-
To get some hints on how to debug your Notebooks if things go wrong, see the Troubleshooting documentation.
-
To discover the AI Notebooks lifecycle and billing, explore this guide.
For more information and tutorials, please see our other AI & Machine Learning support guides or explore the guides for other OVHcloud products and services.
If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for a custom analysis of your project.