For AI agents: the complete documentation index is available at https://docs.ovhcloud.com/es/llms.txt, the full documentation bundle is available at https://docs.ovhcloud.com/es/llms-full.txt, and this page is available as Markdown at https://docs.ovhcloud.com/es/guides/public-cloud/ai-machine-learning/ai-manage-registries.md.
Ir al contenido

Registries - Use & manage your registries

Ver como Markdown

Learn how to use and manage your public and private registries

Objective

This guide is intended to help you to use and manage your public and private registries through ovhai command line interface (AI CLI), API and the . This will help you when working with OVHcloud AI Tools, especially with AI Training and AI Deploy.

Requirements

  • A Public Cloud project

OVHcloud Console Access

  • Direct link:
  • Navigation path: Public Cloud > Select your project

Instructions

This documentation is divided into the following parts:

  • Manage existing registries through
    • OVHcloud Console (UI)
    • OVHcloud AI CLI ovhai
  • Create, configure and use new registries
    • Private Harbor registry
    • Private Docker registry
    • GitHub registry (packages)

Manage existing registries

The Public Cloud provides a default registry called shared registry, where users of a same Public Cloud project are able to push their custom images, and use them through our AI Tools.

Warning

This shared registry can help you perform your tests, but should not be used in production, as we reserve the right to delete its content if deemed necessary. The images pushed to this registry are for AI Tools workloads only, and will not be accessible for external uses.

This is why it can be interesting to add and manage other registries. We can either do this by using the OVHcloud Console (UI) or the ovhai CLI.

Manage existing registries through UI

In the left-hand menu of your Public Cloud project, click AI Notebooks, AI Training or AI Deploy under AI, then click Configuration and open the Docker registries tab.

The upper part of the tab lists your private registries: you can add new ones with Add a registry, and delete them from the list.

The lower part of the tab is dedicated to the shared registry: select a region to display its Registry URL and the commands to log in, tag and push an image.

Manage existing registries through CLI

If you prefer, you can also use the OVHcloud ovhai CLI:

List all your available registries with:

ovhai registry list

Add a registry by using:

ovhai registry add <registry-url>

Update one of your registries with the following command:

ovhai registry update <id>

Delete a registry by using:

ovhai registry delete <id>

If you do not have our ovhai CLI yet, learn how to install it here.

Create, configure and use new registries

Using your own and private registries is the best way to use your images without exposing them to everyone. We distinguish 3 main possibilities:

  • Private Harbor registry
  • Private Docker registry
  • GitHub registry / packages
Warning

Port restriction: Only port 443 is supported for registry connections. If you attempt to add a registry URL with a non-443 port (e.g., 8443), the system will enforce port 443. This may lead to errors or connection timeouts if the registry is not configured to accept HTTPS on port 443.

For self-hosted registries using non-443 ports, consider configuring a reverse proxy (e.g., Nginx, HAProxy) to map traffic from 443 to your desired port (e.g., 8443).

We will see how to implement each of these registries and use them through AI Tools.

Info

In any case, note that the default shared registry will remain available even if you add new registries.

Harbor private registry

OVHcloud Managed Private Registry service allows you to spawn your own authenticated Docker registry where you can privately store your Docker images. This registry is an instance of Harbor, an open source trusted cloud native registry project that stores, signs, and scans Docker images.

Creation

To create your new private registry, we advise you to read and follow the steps mentioned in the Creating a private registry documentation.

At the end of this step, you should have your registry identification details.

Configuration

Then, you will need to use these credentials to connect to the Harbor UI. This will allow you to manage this private registry. This simple step is explained in the Connecting to the UI documentation.

To finish setting up your private Harbor registry, you will need to create a project on Harbor, and associate a user to it (Administrator user is added by default, but you can create a new one for this project). You will find all needed information in this documentation.

Get your OVHcloud Managed Private Registry API URL

In order to add this registry to AI Tools, you will need to retrieve its URL. To do this, click Managed Private Registry under Containers in the left-hand menu of your Public Cloud project, then click the name of your registry.

In the Connection information card, copy the Harbor API URL, which is the URL of your private registry.

Add the Harbor registry

To add your registry, you can either use the OVHcloud Console (UI) or the ovhai CLI.

During this step, you will be asked your user's credentials (user ID and password). You can use the default user (administrator) credentials, which were obtained at the first part of the Create and configure a new private registry step, or those of another user if you have created one.

OVHcloud Console
ovhai CLI

In the left-hand menu of your Public Cloud project, click AI Notebooks, AI Training or AI Deploy under AI, then click Configuration and open the Docker registries tab.

Click Add a registry, then select the Region and fill in the URL, Username and Password fields with your registry URL and credentials.

When you have finished filling in the form, click Add.

Once your registry is added, you should see it in your registries list. You can then use any image pushed on this registry for your AI Training jobs and AI Deploy apps.

Push an image to your registry

Warning

Be careful with the following, as we will use the displayed URL. This version does not contain the https:// part, which is present in the URL given by the Public Cloud.

Log in to your private registry, using a user with write rights to your registry project, with the following command:

docker login -u <user> -p <password> <private-registry-address>

Once connected, all you have to do is build, tag, and push your image. Here is an example:

Build the image from the current directory's Dockerfile:

docker build . -t <image-name>:<tag-name>

Tag the compiled image:

docker tag <image-name>:<tag-name> <private-registry-address>/<harbor_project_name>/<image-name>:<tag-name>

Push the image to your private registry's project:

docker push <private-registry-address>/<harbor_project_name>/<image-name>:<tag-name>

Use your private registry images with OVHcloud AI Tools

Now that your private registry has been created, added to your Public Cloud account, you can use its image(s) in AI Training and AI Deploy.

Here is a basic example with AI Training, when using the CLI:

ovhai job run <private-registry-address>/<harbor_project_name>/<image-name>:<tag-name>

If you prefer to use the OVHcloud Console, this is also possible. In this case, you will have to indicate your custom Docker image in the Docker image section of the job/app creation page (for a job, select Custom image). This path will be <private-registry-address>/<harbor_project_name>/<image-name>:<tag-name>.

Docker private registry

If you prefer to use a private registry from your Docker account, it is also possible.

Let's say we have created a private repository on our Docker account.

We build, tag and push our Docker image in this private repository:

docker build . -t <image-name>:<tag-name>
docker tag <image-name>:<tag-name> <docker_hub_username>/<private_repository_name>:<tag-name>
docker push <docker_hub_username>/<private_repository_name>:<tag-name>

Add the private Docker registry

Once your image is pushed to your Docker account, you will need to add your private Docker registry to the registries of your Public Cloud project.

As with Harbor, this can either be done with UI or CLI. This time, your private registry's URL will be index.docker.io and the requested username and password correspond to those of your Docker account.

During this step, you will be asked your Docker credentials.

Using UI

In the left-hand menu of your Public Cloud project, click AI Notebooks, AI Training or AI Deploy under AI, then click Configuration and open the Docker registries tab.

Click Add a registry, then select the Region and fill in the URL, Username and Password fields. Here, you will need to provide your Docker credentials along with the registry URL.

When you have finished filling in the form, click Add.

Using CLI

To add your private Docker registry via CLI, use:

ovhai registry add index.docker.io

Once your registry is added, you should see it in your registries list.

Use your private registry images with OVHcloud AI Tools

You can now use the images contained in this private Docker registry in AI Tools by specifying index.docker.io. Here is an example to deploy a Streamlit application on AI Deploy:

ovhai app run index.docker.io/<docker_hub_username>/<private_repository_name>:<tag-name> \
--default-http-port 8501

You can also use the OVHcloud Console to deploy a job or an app from your private Docker registry. You will just need to specify your Docker image path in the Docker image section of the job/app creation page. This path will be index.docker.io/<docker_hub_username>/<private_repository_name>:<tag-name>.

GitHub registry

You can also use a GitHub registry, also known as GitHub Packages.

As indicated on their documentation, you can build and push a package image by using the following commands:

docker login ghcr.io --username <your_username> --password <your_token>
docker tag app ghcr.io/<your_username>/<repo-name>:<tag-name>
docker push ghcr.io/<your_username>/<repo-name>:<tag-name>

Add a GitHub registry

Once your image is pushed on your GitHub account, you will need to add your GitHub registry to the registries of your Public Cloud project. As with Harbor and Docker, this can either be done with UI or CLI. This time, your registry's URL will be ghcr.io.

You will be asked your GitHub credentials.

OVHcloud Console
ovhai CLI

In the left-hand menu of your Public Cloud project, click AI Notebooks, AI Training or AI Deploy under AI, then click Configuration and open the Docker registries tab.

Click Add a registry, then select the Region and fill in the URL, Username and Password fields. Here, you will need to provide your GitHub credentials along with the registry URL.

When you have finished filling in the form, click Add.

Use your GitHub registry images with OVHcloud AI Tools

You can now use the packages/images contained in this GitHub registry in AI Tools by specifying ghcr.io. Here is an example to deploy a Streamlit application on AI Deploy:

ovhai app run ghcr.io/<your_username>/<repo-name>:<tag-name> \
--default-http-port 8501

You can also use the OVHcloud Console to deploy a job or an app from a GitHub registry. You will just need to specify your GitHub image path in the Docker image section of the job/app creation page. This path will be ghcr.io/<your_username>/<repo-name>:<tag-name>.

Go further

For training or technical assistance implementing our solutions, contact your sales representative or visit our Professional Services page to request a quote and have your project analysed by our experts.

Feedback

Please send us your questions, feedback and suggestions to improve the service:

¿Le ha resultado útil esta página?