LTT commited on
Commit
444bee2
1 Parent(s): af9c065

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -361,8 +361,16 @@ install_cuda_toolkit()
361
  def make3d(images):
362
  os.environ['CUDA_HOME'] = '/usr/local/cuda-12.1'
363
  os.environ['PATH'] += ':/usr/local/cuda-12.1/bin'
364
- os.environ['LD_LIBRARY_PATH'] += ':/usr/local/cuda-12.1/lib64'
365
-
 
 
 
 
 
 
 
 
366
  cuda_path = find_cuda()
367
 
368
  if cuda_path:
 
361
  def make3d(images):
362
  os.environ['CUDA_HOME'] = '/usr/local/cuda-12.1'
363
  os.environ['PATH'] += ':/usr/local/cuda-12.1/bin'
364
+ # os.environ['LD_LIBRARY_PATH'] += ':/usr/local/cuda-12.1/lib64'
365
+ os.environ['LD_LIBRARY_PATH'] = "/usr/local/cuda-12.1/lib64:" + os.environ.get('LD_LIBRARY_PATH', '')
366
+
367
+ # 验证 libnvrtc.so.12 是否能被加载
368
+ import ctypes
369
+ try:
370
+ ctypes.CDLL("libnvrtc.so.12")
371
+ print("libnvrtc.so.12 loaded successfully!")
372
+ except OSError as e:
373
+ print("Failed to load libnvrtc.so.12:", e)
374
  cuda_path = find_cuda()
375
 
376
  if cuda_path: