ReubenSun commited on
Commit
d7d8e3d
·
1 Parent(s): d26c8ec
Files changed (1) hide show
  1. app.py +2 -16
app.py CHANGED
@@ -2,23 +2,9 @@ import os
2
  import shlex
3
  import spaces
4
  import subprocess
5
- def install_cuda_toolkit():
6
- CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run"
7
- CUDA_TOOLKIT_FILE = "/tmp/%s" % os.path.basename(CUDA_TOOLKIT_URL)
8
- subprocess.call(["wget", "-q", CUDA_TOOLKIT_URL, "-O", CUDA_TOOLKIT_FILE])
9
- subprocess.call(["chmod", "+x", CUDA_TOOLKIT_FILE])
10
- subprocess.call([CUDA_TOOLKIT_FILE, "--silent", "--toolkit"])
11
 
12
- os.environ["CUDA_HOME"] = "/usr/local/cuda"
13
- os.environ["PATH"] = "%s/bin:%s" % (os.environ["CUDA_HOME"], os.environ["PATH"])
14
- os.environ["LD_LIBRARY_PATH"] = "%s/lib:%s" % (
15
- os.environ["CUDA_HOME"],
16
- "" if "LD_LIBRARY_PATH" not in os.environ else os.environ["LD_LIBRARY_PATH"],
17
- )
18
- os.environ["TORCH_CUDA_ARCH_LIST"] = "8.0;8.6"
19
- # install_cuda_toolkit()
20
- print("cd step1x3d_texture/differentiable_renderer/ && bash compile_mesh_painter.sh")
21
- os.system("cd step1x3d_texture/differentiable_renderer/ && bash compile_mesh_painter.sh")
22
  print('install custom')
23
  subprocess.run(shlex.split("pip install custom_rasterizer-0.1-cp310-cp310-linux_x86_64.whl"), check=True)
24
  import time
 
2
  import shlex
3
  import spaces
4
  import subprocess
 
 
 
 
 
 
5
 
6
+ print("cd /home/user/app/step1x3d_texture/differentiable_renderer/ && bash compile_mesh_painter.sh")
7
+ os.system("cd /home/user/app/step1x3d_texture/differentiable_renderer/ && bash compile_mesh_painter.sh")
 
 
 
 
 
 
 
 
8
  print('install custom')
9
  subprocess.run(shlex.split("pip install custom_rasterizer-0.1-cp310-cp310-linux_x86_64.whl"), check=True)
10
  import time