Skip to content

RTX 5070 + Ubuntu successfully installed submodules #1303

@Pangpangju

Description

@Pangpangju

I can see alot of people(including myself) had or are having trouble installing submodules, due to failed-building-wheels or subprocess-exited-with-error.

Initializing the project with environment.yml always ended up with issues for many environments in my case (Ubuntu and Windows both)
So I share my solution so it might help other people going through the same issue.


conda create -n "gaussian-splatting" python=3.9 ipython
conda activate gaussian-splatting
conda install cuda-toolkit=12.8 -c nvidia
conda install -c conda-forge plyfile
conda install tqdm
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
pip install opencv-python
pip install joblib

Open up submodules/diff-gaussian-rasterization/cuda_rasterizer/rasterizer_impl.h
at the header section include this line below
#include <cstdint>

Move to submodules/diff-gaussian-rasterization

pip install . --no-build-isolation
cd ../simple-knn
pip install . --no-build-isolation
cd ../fused-ssim
pip install . --no-build-isolation

If the following error pops up in the training process after successfully installing the submodule

Traceback (most recent call last):
  File "train.py", line 216, in <module>
    training(lp.extract(args), op.extract(args), pp.extract(args), args.test_iterations, args.save_iterations, args.checkpoint_iterations, args.start_checkpoint, args.debug_from)
  File "train.py", line 35, in training
    scene = Scene(dataset, gaussians)
  File "C:\gaussian-splatting\scene\__init__.py", line 83, in _init_
    self.gaussians.create_from_pcd(scene_info.point_cloud, self.cameras_extent)
  File "C:\gaussian-splatting\scene\gaussian_model.py", line 134, in create_from_pcd
    dist2 = torch.clamp_min(distCUDA2(torch.from_numpy(np.asarray(pcd.points)).float().cuda()), 0.0000001)
MemoryError: bad allocation: cudaErrorMemoryAllocation: out of memory

You need to reinstall the submodules by replacing the pip command with the option
pip install . --no-build-isolation
with
TORCH_CUDA_ARCH_LIST="6.0 7.0 7.5 8.0 8.6+PTX" pip install . --no-build-isolation

Reinstall the package after moving into each submodule directory and uninstalling each submodule with

pip uninstall (diff_gaussian_rasterization)
python setup.py clean

Replace it with the package name of each submodule directory (check with pip list)

So your reinstall command would look like

cd submodules/diff-gaussian-rasterization
TORCH_CUDA_ARCH_LIST="6.0 7.0 7.5 8.0 8.6+PTX" pip install . --no-build-isolation
cd ../simple-knn
TORCH_CUDA_ARCH_LIST="6.0 7.0 7.5 8.0 8.6+PTX" pip install . --no-build-isolation
cd ../fused-ssim
TORCH_CUDA_ARCH_LIST="6.0 7.0 7.5 8.0 8.6+PTX" pip install . --no-build-isolation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions