-
Notifications
You must be signed in to change notification settings - Fork 179
/
install.py
40 lines (33 loc) · 1.55 KB
/
install.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import os
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Setup the environment')
parser.add_argument('--no_nvdiffrast', action='store_true', help='Skip installation of Nvdiffrast')
args = parser.parse_args()
# Create a new conda environment
print("[INFO] Creating the conda environment for SuGaR...")
os.system("conda env create -f environment.yml")
print("[INFO] Conda environment created.")
# Install 3D Gaussian Splatting rasterizer
print("[INFO] Installing the 3D Gaussian Splatting rasterizer...")
os.chdir("gaussian_splatting/submodules/diff-gaussian-rasterization/")
os.system("conda run -n sugar pip install -e .")
print("[INFO] 3D Gaussian Splatting rasterizer installed.")
# Install simple-knn
print("[INFO] Installing simple-knn...")
os.chdir("../simple-knn/")
os.system("conda run -n sugar pip install -e .")
print("[INFO] simple-knn installed.")
os.chdir("../../../")
# Install Nvdiffrast
if args.no_nvdiffrast:
print("[INFO] Skipping installation of Nvdiffrast.")
else:
print("[INFO] Installing Nvdiffrast...")
os.system("git clone https://github.com/NVlabs/nvdiffrast")
os.chdir("nvdiffrast")
os.system("conda run -n sugar pip install .")
print("[INFO] Nvdiffrast installed.")
print("[INFO] Please note that Nvdiffrast will take a few seconds or minutes to build the first time it is used.")
os.chdir("../")
print("[INFO] SuGaR installation complete.")