kaifz commited on
Commit
3774569
·
1 Parent(s): 497691a

remove installation

Browse files
app.py CHANGED
@@ -29,41 +29,41 @@ import spaces
29
  from spaces import zero
30
  zero.startup()
31
 
32
- def install_cuda_toolkit():
33
- # CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run"
34
- # CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run"
35
- CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run"
36
- CUDA_TOOLKIT_FILE = "/tmp/%s" % os.path.basename(CUDA_TOOLKIT_URL)
37
- subprocess.call(["wget", "-q", CUDA_TOOLKIT_URL, "-O", CUDA_TOOLKIT_FILE])
38
- subprocess.call(["chmod", "+x", CUDA_TOOLKIT_FILE])
39
- subprocess.call([CUDA_TOOLKIT_FILE, "--silent", "--toolkit"])
40
-
41
- os.environ["CUDA_HOME"] = "/usr/local/cuda"
42
- os.environ["PATH"] = "%s/bin:%s" % (os.environ["CUDA_HOME"], os.environ["PATH"])
43
- os.environ["LD_LIBRARY_PATH"] = "%s/lib:%s" % (
44
- os.environ["CUDA_HOME"],
45
- "" if "LD_LIBRARY_PATH" not in os.environ else os.environ["LD_LIBRARY_PATH"],
46
- )
47
- # Fix: arch_list[-1] += '+PTX'; IndexError: list index out of range
48
- os.environ["TORCH_CUDA_ARCH_LIST"] = "8.0;8.6"
49
-
50
- install_cuda_toolkit()
51
-
52
- gs_path = Path(__file__).parent / "src/third-party/diff-gaussian-rasterization-w-depth"
53
- subprocess.check_call([sys.executable, "-m", "pip", "install", "-e", str(gs_path)])
54
- site.main() # re-processes every *.pth in site-packages
55
- importlib.invalidate_caches()
56
- diff_gaussian_rasterization = importlib.import_module("diff_gaussian_rasterization")
57
-
58
- subprocess.check_call([sys.executable, "-m", "pip", "install", "--no-deps", "dgl", "-f", "https://data.dgl.ai/wheels/torch-2.4/cu124/repo.html"])
59
 
60
  # subprocess.check_call([sys.executable, "-m", "pip", "uninstall", "-y", "torch", "torchvision", "torchaudio"])
61
  # subprocess.check_call([sys.executable, "-m", "pip", "install", "torch==2.4.0", "torchvision==0.19.0", "torchaudio==2.4.0", "--index-url", "https://download.pytorch.org/whl/cu124"])
62
  # os.system('conda install conda-forge::ffmpeg')
63
 
64
- site.main() # re-processes every *.pth in site-packages
65
- importlib.invalidate_caches()
66
- torch = importlib.import_module("torch")
67
 
68
  import torch
69
  import torch.nn as nn
 
29
  from spaces import zero
30
  zero.startup()
31
 
32
+ # def install_cuda_toolkit():
33
+ # # CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run"
34
+ # # CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run"
35
+ # CUDA_TOOLKIT_URL = "https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run"
36
+ # CUDA_TOOLKIT_FILE = "/tmp/%s" % os.path.basename(CUDA_TOOLKIT_URL)
37
+ # subprocess.call(["wget", "-q", CUDA_TOOLKIT_URL, "-O", CUDA_TOOLKIT_FILE])
38
+ # subprocess.call(["chmod", "+x", CUDA_TOOLKIT_FILE])
39
+ # subprocess.call([CUDA_TOOLKIT_FILE, "--silent", "--toolkit"])
40
+
41
+ # os.environ["CUDA_HOME"] = "/usr/local/cuda"
42
+ # os.environ["PATH"] = "%s/bin:%s" % (os.environ["CUDA_HOME"], os.environ["PATH"])
43
+ # os.environ["LD_LIBRARY_PATH"] = "%s/lib:%s" % (
44
+ # os.environ["CUDA_HOME"],
45
+ # "" if "LD_LIBRARY_PATH" not in os.environ else os.environ["LD_LIBRARY_PATH"],
46
+ # )
47
+ # # Fix: arch_list[-1] += '+PTX'; IndexError: list index out of range
48
+ # os.environ["TORCH_CUDA_ARCH_LIST"] = "8.0;8.6"
49
+
50
+ # install_cuda_toolkit()
51
+
52
+ # gs_path = Path(__file__).parent / "src/third-party/diff-gaussian-rasterization-w-depth"
53
+ # subprocess.check_call([sys.executable, "-m", "pip", "install", "-e", str(gs_path)])
54
+ # site.main() # re-processes every *.pth in site-packages
55
+ # importlib.invalidate_caches()
56
+ # diff_gaussian_rasterization = importlib.import_module("diff_gaussian_rasterization")
57
+
58
+ # subprocess.check_call([sys.executable, "-m", "pip", "install", "--no-deps", "dgl", "-f", "https://data.dgl.ai/wheels/torch-2.4/cu124/repo.html"])
59
 
60
  # subprocess.check_call([sys.executable, "-m", "pip", "uninstall", "-y", "torch", "torchvision", "torchaudio"])
61
  # subprocess.check_call([sys.executable, "-m", "pip", "install", "torch==2.4.0", "torchvision==0.19.0", "torchaudio==2.4.0", "--index-url", "https://download.pytorch.org/whl/cu124"])
62
  # os.system('conda install conda-forge::ffmpeg')
63
 
64
+ # site.main() # re-processes every *.pth in site-packages
65
+ # importlib.invalidate_caches()
66
+ # torch = importlib.import_module("torch")
67
 
68
  import torch
69
  import torch.nn as nn
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- warp-lang==1.1.0
2
  trimesh
3
  pyyaml
4
  numpy==1.26.4
@@ -23,6 +23,27 @@ timm
23
  omegaconf
24
  hydra-core
25
  wandb
26
- torch==2.6.0 --index-url https://download.pytorch.org/whl/cu124
27
- torchvision==0.21.0 --index-url https://download.pytorch.org/whl/cu124
28
- torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # warp-lang==1.1.0
2
  trimesh
3
  pyyaml
4
  numpy==1.26.4
 
23
  omegaconf
24
  hydra-core
25
  wandb
26
+
27
+ # torch==2.6.0 --index-url https://download.pytorch.org/whl/cu124
28
+ # torchvision==0.21.0 --index-url https://download.pytorch.org/whl/cu124
29
+ # torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124
30
+ # diff-gaussian-rasterization @ file://./src/third-party/diff-gaussian-rasterization-w-depth
31
+ # dgl==2.4.0+cu124 --find-links https://data.dgl.ai/wheels/torch-2.4/cu124/repo.html
32
+
33
+ # --- core CUDA wheels -------------------------------------------------
34
+ --extra-index-url https://download.pytorch.org/whl/cu124
35
+ torch==2.4.0+cu124 # ⇦ install Torch first
36
+ torchvision==0.19.0+cu124
37
+ torchaudio==2.4.0+cu124
38
+
39
+ # --- DGL (needs the matching Torch 2.4 wheel) -------------------------
40
+ --find-links https://data.dgl.ai/wheels/torch-2.4/cu124/repo.html
41
+ dgl==2.4.0+cu124
42
+
43
+ warp-lang==1.1.0
44
+
45
+ # --- everything that depends on torch *after* this point --------------
46
+ # editable build (keeps recompiling when you edit the code)
47
+ -e ./src/third-party/diff-gaussian-rasterization-w-depth
48
+ # or, if you prefer an immutable wheel:
49
+ # diff-gaussian-rasterization @ ./src/third-party/diff-gaussian-rasterization-w-depth
src/experiments/real_world/gs/helpers.py CHANGED
@@ -3,9 +3,9 @@ import os
3
  # import open3d as o3d
4
  import numpy as np
5
  from pathlib import Path
6
- import importlib
7
 
8
- diff_gaussian_rasterization = importlib.import_module("diff_gaussian_rasterization")
 
9
  from diff_gaussian_rasterization import GaussianRasterizationSettings as Camera
10
 
11
 
 
3
  # import open3d as o3d
4
  import numpy as np
5
  from pathlib import Path
 
6
 
7
+ # import importlib
8
+ # diff_gaussian_rasterization = importlib.import_module("diff_gaussian_rasterization")
9
  from diff_gaussian_rasterization import GaussianRasterizationSettings as Camera
10
 
11