Update app.py
Browse files
app.py
CHANGED
@@ -343,19 +343,17 @@ def make_mesh(mesh_fpath, planes):
|
|
343 |
install_cuda_toolkit()
|
344 |
@spaces.GPU
|
345 |
def make3d(images):
|
|
|
|
|
|
|
346 |
|
347 |
-
|
348 |
cuda_path = find_cuda()
|
349 |
|
350 |
if cuda_path:
|
351 |
print(f"CUDA installation found at: {cuda_path}")
|
352 |
else:
|
353 |
print("CUDA installation not found")
|
354 |
-
|
355 |
-
os.environ['PATH'] += ':/usr/local/cuda/bin'
|
356 |
-
os.environ['LD_LIBRARY_PATH'] += ':/usr/local/cuda/lib64'
|
357 |
-
|
358 |
-
|
359 |
print(f"CUDA_HOME:{os.environ.get('CUDA_HOME')}")
|
360 |
print(f"CUDA_HOME exist:{os.path.exists(os.environ.get('CUDA_HOME'))}")
|
361 |
subprocess.run(['nvidia-smi']) # 测试 CUDA 是否可用
|
|
|
343 |
install_cuda_toolkit()
|
344 |
@spaces.GPU
|
345 |
def make3d(images):
|
346 |
+
os.environ['CUDA_HOME'] = '/usr/local/cuda-11.8'
|
347 |
+
os.environ['PATH'] += ':/usr/local/cuda-11.8/bin'
|
348 |
+
os.environ['LD_LIBRARY_PATH'] += ':/usr/local/cuda-11.8/lib64'
|
349 |
|
|
|
350 |
cuda_path = find_cuda()
|
351 |
|
352 |
if cuda_path:
|
353 |
print(f"CUDA installation found at: {cuda_path}")
|
354 |
else:
|
355 |
print("CUDA installation not found")
|
356 |
+
|
|
|
|
|
|
|
|
|
357 |
print(f"CUDA_HOME:{os.environ.get('CUDA_HOME')}")
|
358 |
print(f"CUDA_HOME exist:{os.path.exists(os.environ.get('CUDA_HOME'))}")
|
359 |
subprocess.run(['nvidia-smi']) # 测试 CUDA 是否可用
|