mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-10-11 04:16:17 +00:00
Update flask_server.py
This commit is contained in:
@@ -1705,7 +1705,6 @@ def get_detailed_gpu_info(gpu):
|
|||||||
if 'intel' in vendor:
|
if 'intel' in vendor:
|
||||||
print(f"[v0] Intel GPU detected, checking for intel_gpu_top...", flush=True)
|
print(f"[v0] Intel GPU detected, checking for intel_gpu_top...", flush=True)
|
||||||
|
|
||||||
# Try to find system intel_gpu_top first (not the one in AppImage)
|
|
||||||
intel_gpu_top_path = None
|
intel_gpu_top_path = None
|
||||||
system_paths = ['/usr/bin/intel_gpu_top', '/usr/local/bin/intel_gpu_top']
|
system_paths = ['/usr/bin/intel_gpu_top', '/usr/local/bin/intel_gpu_top']
|
||||||
for path in system_paths:
|
for path in system_paths:
|
||||||
@@ -1723,7 +1722,6 @@ def get_detailed_gpu_info(gpu):
|
|||||||
if intel_gpu_top_path:
|
if intel_gpu_top_path:
|
||||||
print(f"[v0] intel_gpu_top found, executing...", flush=True)
|
print(f"[v0] intel_gpu_top found, executing...", flush=True)
|
||||||
try:
|
try:
|
||||||
import os
|
|
||||||
print(f"[v0] Current user: {os.getenv('USER', 'unknown')}, UID: {os.getuid()}, GID: {os.getgid()}", flush=True)
|
print(f"[v0] Current user: {os.getenv('USER', 'unknown')}, UID: {os.getuid()}, GID: {os.getgid()}", flush=True)
|
||||||
print(f"[v0] Current working directory: {os.getcwd()}", flush=True)
|
print(f"[v0] Current working directory: {os.getcwd()}", flush=True)
|
||||||
|
|
||||||
@@ -1735,11 +1733,6 @@ def get_detailed_gpu_info(gpu):
|
|||||||
writable = os.access(drm_dev, os.W_OK)
|
writable = os.access(drm_dev, os.W_OK)
|
||||||
print(f"[v0] {drm_dev}: mode={oct(stat_info.st_mode)}, uid={stat_info.st_uid}, gid={stat_info.st_gid}, readable={readable}, writable={writable}", flush=True)
|
print(f"[v0] {drm_dev}: mode={oct(stat_info.st_mode)}, uid={stat_info.st_uid}, gid={stat_info.st_gid}, readable={readable}, writable={writable}", flush=True)
|
||||||
|
|
||||||
# intel_gpu_top_path = shutil.which('intel_gpu_top') # This line is now redundant
|
|
||||||
# print(f"[v0] intel_gpu_top path: {intel_gpu_top_path}", flush=True) # This line is now redundant
|
|
||||||
|
|
||||||
# intel_gpu_top_path already set above
|
|
||||||
|
|
||||||
# Prepare environment with all necessary variables
|
# Prepare environment with all necessary variables
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env['TERM'] = 'xterm' # Ensure terminal type is set
|
env['TERM'] = 'xterm' # Ensure terminal type is set
|
||||||
|
Reference in New Issue
Block a user