szymanowiczs / splatter-image

Official implementation of `Splatter Image: Ultra-Fast Single-View 3D Reconstruction' CVPR 2024
https://szymanowiczs.github.io/splatter-image
BSD 3-Clause "New" or "Revised" License
795 stars 54 forks source link

simplifying the python environment creation on windows #49

Open martinResearch opened 3 months ago

martinResearch commented 3 months ago

Thank you for the great work and for sharing this code.

I simplified the environment creation process on my machine by using conda to install the cuda toolkit dlls and binaries. This also has the advantage it creates a self-contained environement that does not interfere with other cuda installations on the machine. Maybe this could be integrated in this repository? I added diff-gaussian-rasterization as a git submodule to this repo using

git submodule add https://github.com/graphdeco-inria/diff-gaussian-rasterization.git third_party/diff-gaussian-rasterization

then added an environment.yml file with

name: splatter_image

channels:
  - pytorch
  - defaults
  - nvidia/label/cuda-11.8.0
  - conda-forge

dependencies:
  - python=3.10
  - cuda-version=11.8
  - cuda-toolkit=11.8
  - pip=24.0
  - pytorch=2.0.0
  - plyfile
  - torchaudio
  - torchvision
  - tqdm
  - pip:
    - third_party/diff-gaussian-rasterization
    - -r requirements.txt
variables:
  CUDA_PATH: ""

and final added a script install_on_windows.bat with

git submodule init
git submodule update --init --recursive
set DISTUTILS_USE_SDK= 1
set CUDA_PATH=
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"   
conda env create --file environment.yml
szymanowiczs commented 3 months ago

This is great @martinResearch - thanks a lot! I'll try to integrate it in the main repo.