yslan commited on
Commit
ae00fc1
1 Parent(s): bbd5eb0
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -1,4 +1,6 @@
1
  import os
 
 
2
  import subprocess
3
 
4
  def install_cuda_toolkit():
@@ -20,21 +22,20 @@ def install_cuda_toolkit():
20
 
21
  install_cuda_toolkit() # to compile the dependencies
22
 
23
- os.system('pip install ./submodules/simple-knn')
24
- os.system('pip install ./submodules/diff-surfel-rasterization')
25
- # import simple_knn
26
- # import diff_surfel_rasterization
27
-
28
- import torch
29
  pyt_version_str=torch.__version__.split("+")[0].replace(".", "")
30
  version_str="".join([
31
  f"py3{sys.version_info.minor}_cu",
32
  torch.version.cuda.replace(".",""),
33
  f"_pyt{pyt_version_str}"
34
  ])
 
35
  os.system('pip install iopath')
36
  os.system(f'pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html')
37
 
 
 
 
 
38
  import argparse
39
  import spaces
40
  import json
 
1
  import os
2
+ import torch
3
+ import sys
4
  import subprocess
5
 
6
  def install_cuda_toolkit():
 
22
 
23
  install_cuda_toolkit() # to compile the dependencies
24
 
 
 
 
 
 
 
25
  pyt_version_str=torch.__version__.split("+")[0].replace(".", "")
26
  version_str="".join([
27
  f"py3{sys.version_info.minor}_cu",
28
  torch.version.cuda.replace(".",""),
29
  f"_pyt{pyt_version_str}"
30
  ])
31
+ # install pytorch3d with the right version
32
  os.system('pip install iopath')
33
  os.system(f'pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html')
34
 
35
+ # install 2dgs dependencies
36
+ os.system('pip install ./submodules/simple-knn')
37
+ os.system('pip install ./submodules/diff-surfel-rasterization')
38
+
39
  import argparse
40
  import spaces
41
  import json