mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-10 18:17:31 +08:00
Add Pixi as an option for installation (#3130)
* pixi installation optiont * chore: Update .gitignore to include /third_party and include pixi lock file * feat: Update download and training commands for dozer data The commit updates the download and training commands for the dozer data in the `pixi.toml` file. It renames the `download-sample-data` command to `download-dozer-data` and modifies the `train-example-splat` and `train-example-nerf` commands to include the dozer data as a dependency. This makes it easy to run an example training for both nerfacto and splatfacto * update to include range between 3.8 -3.10 * Add Pixi installation instructions to the installation.md file --------- Co-authored-by: maturk <30566358+maturk@users.noreply.github.com>
This commit is contained in:
parent
e6d780d2a0
commit
8d5502db1a
3
.gitignore
vendored
3
.gitignore
vendored
@ -188,3 +188,6 @@ camera_paths/
|
||||
*/**/.DS_Store
|
||||
*/**/._.DS_Store
|
||||
|
||||
# pixi environments
|
||||
.pixi
|
||||
/third_party
|
||||
@ -122,6 +122,35 @@ pip install -e .[dev]
|
||||
pip install -e .[docs]
|
||||
```
|
||||
|
||||
## Using Pixi
|
||||
[Pixi](https://pixi.sh/latest/) is a fast software package manager built on top of the existing conda ecosystem. Spins up development environments quickly on Windows, macOS and Linux. (Currently only linux is supported for nerfstudio)
|
||||
|
||||
### Prerequisites
|
||||
Make sure to have pixi installed, detailed instructions [here](https://pixi.sh/latest/)
|
||||
|
||||
TLDR for linux:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://pixi.sh/install.sh | bash
|
||||
```
|
||||
|
||||
### Install Pixi Environmnent
|
||||
After Pixi is installed, you can run
|
||||
```bash
|
||||
pixi run post-install
|
||||
pixi shell
|
||||
```
|
||||
This will install all enviroment dependancies including colmap, tinycudann and hloc, and the active the conda environment
|
||||
|
||||
you could also run
|
||||
|
||||
```bash
|
||||
pixi run post-install
|
||||
pixi run train-example-nerf
|
||||
```
|
||||
|
||||
to download an example dataset and run nerfacto straight away
|
||||
|
||||
## Use docker image
|
||||
|
||||
Instead of installing and compiling prerequisites, setting up the environment and installing dependencies, a ready to use docker image is provided.
|
||||
|
||||
36
pixi.toml
Normal file
36
pixi.toml
Normal file
@ -0,0 +1,36 @@
|
||||
[project]
|
||||
name = "nerfstudio"
|
||||
version = "1.0.3"
|
||||
description = "All-in-one repository for state-of-the-art NeRFs"
|
||||
channels = ["nvidia/label/cuda-11.8.0", "nvidia", "conda-forge", "pytorch"]
|
||||
platforms = ["linux-64"]
|
||||
|
||||
[system-requirements]
|
||||
libc = { family="glibc", version="2.30" }
|
||||
|
||||
[tasks]
|
||||
# || operator in pixi allows running a command after only if the command before || fails
|
||||
tcnn-install = "python -c 'import tinycudann as tcnn' || python -m pip install ninja git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch"
|
||||
make-third_party-dir = {cmd="ls third_party || mkdir third_party"}
|
||||
clone-hloc = {cmd="ls Hierarchical-Localization || git clone --recursive https://github.com/cvg/Hierarchical-Localization/", cwd = "third_party", depends_on=["make-third_party-dir"] }
|
||||
hloc-install = {cmd="python -m pip install -e .", cwd = "third_party/Hierarchical-Localization" , depends_on=["clone-hloc"], outputs=["third_party/Hierarchical-Localization/hloc.egg-info/PKG-INFO"]}
|
||||
post-install = {cmd="pwd", depends_on=["hloc-install", "tcnn-install"]}
|
||||
|
||||
download-dozer-data = {cmd="ls data/nerfstudio/dozer || ns-download-data nerfstudio --capture-name dozer"}
|
||||
train-example-splat = {cmd="ns-train splatfacto --data data/nerfstudio/dozer/", depends_on=["post-install", "download-dozer-data"]}
|
||||
train-example-nerf = {cmd="ns-train nerfacto --data data/nerfstudio/dozer/", depends_on=["post-install", "download-dozer-data"]}
|
||||
|
||||
|
||||
[dependencies]
|
||||
python = ">=3.8,<3.11"
|
||||
pip = ">=24.0,<25"
|
||||
cuda = {version = "*", channel="nvidia/label/cuda-11.8.0"}
|
||||
pytorch-cuda = {version = "11.8.*", channel="pytorch"}
|
||||
pytorch = {version = ">=2.2.0,<2.3", channel="pytorch"}
|
||||
torchvision = {version = ">=0.17.0,<0.18", channel="pytorch"}
|
||||
pyarrow = ">=15.0.2,<15.1"
|
||||
colmap = ">=3.9.1,<3.10"
|
||||
|
||||
|
||||
[pypi-dependencies]
|
||||
nerfstudio = { path = ".", editable = true}
|
||||
Loading…
Reference in New Issue
Block a user