Huiwenshi commited on
Commit
ed0e197
·
verified ·
1 Parent(s): a926ca7

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. hg_app.py +3 -2
  2. requirements.txt +2 -1
hg_app.py CHANGED
@@ -4,7 +4,7 @@ if True:
4
  import spaces
5
  import subprocess
6
  import sys
7
-
8
 
9
  def install_package(package_path):
10
  # 确保 package_path 是绝对路径
@@ -46,7 +46,8 @@ if True:
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"
 
4
  import spaces
5
  import subprocess
6
  import sys
7
+ import shlex
8
 
9
  def install_package(package_path):
10
  # 确保 package_path 是绝对路径
 
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
+ subprocess.run(shlex.split("pip install . --no-build-isolation"), cwd="/home/user/app/hy3dgen/texgen/custom_rasterizer/", check=True)
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
 
53
  IP = "0.0.0.0"
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