Tensorflow install-no 11.2 for Ubuntu 22.04


Been trying forever to install Tensorflow.

Instructions on TF website say to use CUDA-toolkit 11.2 but on the Nvidia site 11.2 is not available for Ubuntu 22.04 (only 20.04 and below).

I tried using 11.7 and got everything installed ok but it gave me a lot of issues with OOM errors when training (even with the memory reduction flag). Hoping 11.2 would work better.

So do i definitely need 11.2 and if so how do I get it?

Have you tried to download CUDA Toolkit 11.2 ? Thank you.

I see the one listed under 20.04 is actually generic and can be used with 22.04.
Problem solved.

Yes, that is what i was trying but if you click on Linux then x86_64 then Ubuntu there is no 22.04 option…only 20.04 18.04 and 16.4

Can you tell us which version of TF you work with?

To solve OOM error there are a couple of things you can try -

i) Limit gpu memory growth - You can try limiting gpu memory by two ways :

a) Turn on memory growth by calling tf.config.experimental.set_memory_growth, it allocates more memory as the process increases and demands extra memory
b) Set a hard limit on the total memory tf.config.set_logical_device_configuration(memory_limit=1024).

ii) reduce batch size for training

Thank you