Skip to content

Commit

Permalink
Trying to fix non gpu status
Browse files Browse the repository at this point in the history
  • Loading branch information
javizqh committed Oct 22, 2024
1 parent 9eb3d90 commit 47f6f6c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions manager/libs/process_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,20 @@ def wait_for_process_to_start(process_name, timeout=60):

def check_gpu_acceleration():
try:
# Verifica si /dev/dri existe
if not os.path.exists("/dev/dri"):
LogManager.logger.error(
"/dev/dri does not exist. No direct GPU access.")
return "OFF"

# # Obtiene la salida de glxinfo
# result = subprocess.check_output(
# "glxinfo | grep direct", shell=True).decode('utf-8')
# print(result)

# # Verifica si la aceleración directa está habilitada
# return "direct rendering: Yes" in result

vendor_name = os.environ['DRI_VENDOR']
return vendor_name.upper()
except Exception as e:
Expand Down

0 comments on commit 47f6f6c

Please sign in to comment.