Warning |
---|
This example has been tested on EUMETSAT side of the EWC. |
Info |
---|
Tensorflow library has many dependencies that interest all the stack (from application level to hardware) and it is released quite often by the community. For the purpose of this documention for GPUs on Tensorflow. The following assumptions have been considered: |
Info |
You have to have
|
It is highly recommended to install Tensorflow inside a virtual environment using Conda or virtualenv, here is a simple example using virtualenv:
...
In order to run the following example you need to have the following packages in your environment:
- tensorflow
You can check this documentation for Install package in Python environment and handle python environments for reproducibility.
...
CentOS 7
Install the prerequisites and Tensorflow 2.8:
Code Block |
---|
sudo yum -y install epel-release sudo yum update -y sudo yum -y groupinstall "Development Tools" sudo yum -y install openssl-devel bzip2-devel libffi-devel xz-devel python3pipenv -m pip install tensorflow==2.8.0 OS=rhel7 && \ sudo yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.repo && \ sudo yum clean all && \ sudo yum install -y sudo yum install libcudnn8.x86_64 libcudnn8-devel.x86_64 |
...
Code Block |
---|
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')] |
Ubuntu 20.04
Begin by installing the nvidia-cuda-toolkit:
...
Now install Tensorflow with pippipenv (or conda):
Code Block |
---|
python3 -m pippipenv install tensorflow==2.8.0 |
...