Doubiiu commited on
Commit
9681ac8
·
verified ·
1 Parent(s): 645e84d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -8
app.py CHANGED
@@ -38,16 +38,22 @@ os.makedirs(opts.save_dir,exist_ok=True)
38
  test_tensor = torch.Tensor([0]).cuda()
39
  opts.device = str(test_tensor.device)
40
  # os.system('pip install iopath') FORCE_CUDA=1
41
- os.system('curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz')
42
- os.system('tar xzf 1.10.0.tar.gz')
43
- os.system('export CUB_HOME=$PWD/cub-1.10.0')
44
- spaces.GPU(os.system("pip install 'git+https://github.com/facebookresearch/pytorch3d.git'"))
 
 
 
 
 
 
 
 
45
  os.system("mkdir -p checkpoints/ && wget https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth -P checkpoints/")
46
 
47
- print(f'>>> System info: CUDA: {torch.version.cuda}')
48
- os.system('ls -l /usr/local | grep cuda')
49
- os.system('nvcc -V')
50
- os.system('nvidia-smi')
51
 
52
  from viewcrafter import ViewCrafter
53
 
 
38
  test_tensor = torch.Tensor([0]).cuda()
39
  opts.device = str(test_tensor.device)
40
  # os.system('pip install iopath') FORCE_CUDA=1
41
+ # os.system('curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz')
42
+ # os.system('tar xzf 1.10.0.tar.gz')
43
+ # os.system('export CUB_HOME=$PWD/cub-1.10.0')
44
+ # spaces.GPU(os.system("pip install 'git+https://github.com/facebookresearch/pytorch3d.git'"))
45
+ pyt_version_str=torch.__version__.split("+")[0].replace(".", "")
46
+ version_str="".join([
47
+ f"py3{sys.version_info.minor}_cu",
48
+ torch.version.cuda.replace(".",""),
49
+ f"_pyt{pyt_version_str}"
50
+ ])
51
+ print(version_str)
52
+ os.system(f"{sys.executable} -m pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html")
53
  os.system("mkdir -p checkpoints/ && wget https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth -P checkpoints/")
54
 
55
+ print(f'>>> System info: {version_str}')
56
+
 
 
57
 
58
  from viewcrafter import ViewCrafter
59