Commit
Β·
9cc3979
1
Parent(s):
695826d
debug
Browse files
app.py
CHANGED
@@ -181,6 +181,12 @@ def text_to_detailed(prompt, seed=None):
|
|
181 |
os.environ["TORCH_CUDA_ARCH_LIST"] = "9.0"
|
182 |
if "CUDA_VISIBLE_DEVICES" in os.environ:
|
183 |
del os.environ["CUDA_VISIBLE_DEVICES"]
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
subprocess.run(['nvidia-smi'])
|
185 |
import nvdiffrast.torch as dr
|
186 |
dr.RasterizeCudaContext()
|
|
|
181 |
os.environ["TORCH_CUDA_ARCH_LIST"] = "9.0"
|
182 |
if "CUDA_VISIBLE_DEVICES" in os.environ:
|
183 |
del os.environ["CUDA_VISIBLE_DEVICES"]
|
184 |
+
os.environ['CUDA_HOME'] = '/usr/local/cuda-12.1'
|
185 |
+
os.environ['PATH'] += ':/usr/local/cuda-12.1/bin'
|
186 |
+
os.environ['LD_LIBRARY_PATH'] = "/usr/local/cuda-12.1/lib64:" + os.environ.get('LD_LIBRARY_PATH', '')
|
187 |
+
subprocess.run(['nvidia-smi']) # Test if CUDA is available
|
188 |
+
print(f"torch.cuda.is_available:{torch.cuda.is_available()}")
|
189 |
+
print("Device count:", torch.cuda.device_count())
|
190 |
subprocess.run(['nvidia-smi'])
|
191 |
import nvdiffrast.torch as dr
|
192 |
dr.RasterizeCudaContext()
|