stucks when listing available device with tensorflow (gpu passthrough)

khkim256

New Member
Dec 28, 2022
1
0
1
Hi,

I've created Centos 7.6 VM and gpu passthrough Nvidia 1060 6g, and installed nvidia driver version 470.42.01.
running "nvidia-smi" seems works fine and it prints my nvidia graphic card with message "no running process".

but when I start running Python(3.6.8) with Tensorflow(2.6.2) and check available device with "device_lib.list_local_devices()" , my code hangs and got stucked.

I'm running Proxmox 7.3 on AMD CPU and I've followed all instruction on https://pve.proxmox.com/wiki/Pci_passthrough

Is there anyone who had running tensorflow-gpu with gpu passthrough on VM... pls I need help!
Thank you
 
Hi,

Sorry it took so long to respond. Are you still having issues?

I tried getting tensorflow running on centos but, since I have little experience with centos and it is end-of-life, I gave up and tried in Debian 11 instead. I got it to run there on a gtx 1030. I know debian!=centos but if you don't need centos i'd try debian if I where you (or on of the centos replacements: rock linux and alma linux)

Here is what I did:
  1. set up a debian 11 virtual machine: set the cpu to host, bios to ovmf and machine to q35
  2. set up pcie passthrough
  3. installed the nvidia drivers (i had to disable secure boot. you can do this by entering the bios at boot by pressing f2 and then disabling secureboot in the menu)
  4. installed tensorflow
I hope this helps, let me know how it goes
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!