hysts HF staff commited on
Commit
e78dd15
·
1 Parent(s): a926ca7

Fix custom installation

Browse files
Files changed (2) hide show
  1. hg_app.py +5 -3
  2. requirements.txt +2 -1
hg_app.py CHANGED
@@ -2,6 +2,7 @@
2
  if True:
3
  import os
4
  import spaces
 
5
  import subprocess
6
  import sys
7
 
@@ -39,16 +40,17 @@ if True:
39
  )
40
  # Fix: arch_list[-1] += '+PTX'; IndexError: list index out of range
41
  os.environ["TORCH_CUDA_ARCH_LIST"] = "8.0;8.6"
42
-
43
  # install_cuda_toolkit()
44
  print("cd /home/user/app/hy3dgen/texgen/differentiable_renderer/ && bash compile_mesh_painter.sh")
45
  os.system("cd /home/user/app/hy3dgen/texgen/differentiable_renderer/ && bash compile_mesh_painter.sh")
46
  # print("cd /home/user/app/hy3dgen/texgen/custom_rasterizer && python3 -m pip install .")
47
  # os.system("cd /home/user/app/hy3dgen/texgen/custom_rasterizer && python3 -m pip install .")
48
  print('install custom')
49
- install_package("/home/user/app/hy3dgen/texgen/custom_rasterizer")
50
  # os.system("cd /home/user/app/hy3dgen/texgen/custom_rasterizer && CUDA_HOME=/usr/local/cuda FORCE_CUDA=1 TORCH_CUDA_ARCH_LIST='8.0;8.6;8.9;9.0' python setup.py install")
51
-
 
52
  IP = "0.0.0.0"
53
  PORT = 7860
54
 
 
2
  if True:
3
  import os
4
  import spaces
5
+ import shlex
6
  import subprocess
7
  import sys
8
 
 
40
  )
41
  # Fix: arch_list[-1] += '+PTX'; IndexError: list index out of range
42
  os.environ["TORCH_CUDA_ARCH_LIST"] = "8.0;8.6"
43
+
44
  # install_cuda_toolkit()
45
  print("cd /home/user/app/hy3dgen/texgen/differentiable_renderer/ && bash compile_mesh_painter.sh")
46
  os.system("cd /home/user/app/hy3dgen/texgen/differentiable_renderer/ && bash compile_mesh_painter.sh")
47
  # print("cd /home/user/app/hy3dgen/texgen/custom_rasterizer && python3 -m pip install .")
48
  # os.system("cd /home/user/app/hy3dgen/texgen/custom_rasterizer && python3 -m pip install .")
49
  print('install custom')
50
+ # install_package("/home/user/app/hy3dgen/texgen/custom_rasterizer")
51
  # os.system("cd /home/user/app/hy3dgen/texgen/custom_rasterizer && CUDA_HOME=/usr/local/cuda FORCE_CUDA=1 TORCH_CUDA_ARCH_LIST='8.0;8.6;8.9;9.0' python setup.py install")
52
+ subprocess.run(shlex.split("pip install . --no-build-isolation"), cwd="/home/user/app/hy3dgen/texgen/custom_rasterizer/", check=True)
53
+
54
  IP = "0.0.0.0"
55
  PORT = 7860
56
 
requirements.txt CHANGED
@@ -32,4 +32,5 @@ pygltflib
32
  sentencepiece
33
  gradio
34
  uvicorn
35
- fastapi
 
 
32
  sentencepiece
33
  gradio
34
  uvicorn
35
+ fastapi
36
+ wheel