AI Training - Tutoriel - Exécuter votre premier code Tensorflow avec des GPU (EN)

Comment utiliser la librairie Tensorflow avec des GPU

Last updated 1st September, 2022.

Objective

This tutorial covers the process of starting a new Jupyter notebook and experiment examples on using GPUs with it.

Requirements

Launch and access Jupyter notebook with Tensorflow library

If you want to launch it from the OVHcloud Control Panel, just follow this guide and select the Tensorflow 2 docker image.

If you want to launch it with the CLI, just choose the number of GPUs (<nb-gpus>) to use on jour job and use the following command:

ovhai job run ovhcom/ai-training-tensorflow:2.3.0 --gpu <nb-gpus>

You can then reach your notebook's URL once the job is Running.

Clone the GitHub example repository

The GitHub repository containing all examples for OVHcloud AI TRAINING is available here.

Inside your notebook, open a new Terminal tab by clicking File > New > Terminal.

image

Run the following command in the notebook's terminal to clone the repository:

git clone https://github.com/ovh/ai-training-examples.git

Experiment with examples notebooks

We currently provide the following tutorials for Tensorflow as ipython notebooks:

  • Basic computation using single CPU or GPU: accessible on notebooks/tensorflow/tuto/basic_gpu_cpu_benchmark.ipynb
  • Basic computation using multiple GPUs: accessible on notebooks/tensorflow/tuto/multiple_gpus_computation.ipynb.ipynb

Basic computation using a single CPU or GPU

The aim of this tutorial is to do a very simple tensor computation with the Tensorflow library and to compare performances of running it over CPU versus GPU.

A preview of this notebook can be found on GitHub here.

Basic computation using multiple GPUs

The aim of this tutorial is to do a very simple tensor computation with the Tensorflow library and to compare performances of running it over CPU versus GPU.

A preview of this notebook can be found on GitHub here.

Go further

  • You can compare AI models based on resource consumption, accuracy and training time. Refer to this tutorial.
  • It is possible to do the same thing with PyTorch based on this notebook.

Feedback

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


Cette documentation vous a-t-elle été utile ?

N’hésitez pas à nous proposer des suggestions d’amélioration afin de faire évoluer cette documentation.

Images, contenu, structure… N’hésitez pas à nous dire pourquoi afin de la faire évoluer ensemble !

Vos demandes d’assistance ne seront pas traitées par ce formulaire. Pour cela, utilisez le formulaire "Créer un ticket" .

Merci beaucoup pour votre aide ! Vos retours seront étudiés au plus vite par nos équipes..


Ces guides pourraient également vous intéresser...

OVHcloud Community

Accedez à votre espace communautaire. Posez des questions, recherchez des informations, publiez du contenu et interagissez avec d’autres membres d'OVHcloud Community.

Echanger sur OVHcloud Community

Conformément à la Directive 2006/112/CE modifiée, à partir du 01/01/2015, les prix TTC sont susceptibles de varier selon le pays de résidence du client
(par défaut les prix TTC affichés incluent la TVA française en vigueur).