From 2a4610cd35354f9977e4f30b701b1c9eb443dee5 Mon Sep 17 00:00:00 2001 From: Johnny Date: Fri, 30 Aug 2024 15:00:10 +0200 Subject: [PATCH 01/15] Update pyproject.toml --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 027ef13744..21ec1d1762 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "protobuf<=3.20.3,!=3.20.0", # TODO(1480) enable when pycolmap windows wheels are available # "pycolmap==0.3.0", - "pymeshlab>=2022.2.post2; platform_machine != 'arm64' and platform_machine != 'aarch64'", + "pymeshlab>=2022.2.post2; platform_machine != 'arm64'", "pyngrok>=5.1.0", "python-socketio>=5.7.1", "pyquaternion>=0.9.9", @@ -94,7 +94,7 @@ dev = [ "typeguard==2.13.3", "ruff>=0.6.1", "sshconf==0.2.5", - "pycolmap>=0.3.0", # NOTE: pycolmap==0.3.0 is not available on newer python versions + "pycolmap>=3.10.0", # NOTE: pycolmap==0.3.0 is not available on newer python versions "diffusers==0.16.1", "opencv-stubs==0.0.7", "transformers==4.29.2", From 27ba7a319ca1768eb76bca85fdf85cef209543db Mon Sep 17 00:00:00 2001 From: Johnny Date: Fri, 30 Aug 2024 15:07:18 +0200 Subject: [PATCH 02/15] Update Dockerfile compatible with arm builds --- Dockerfile | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index f1b29ea7aa..d4d7617102 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,9 +67,10 @@ RUN apt-get update && \ wget && \ rm -rf /var/lib/apt/lists/* +RUN pip3 install build wheel # Install GLOG (required by ceres). -RUN git clone --branch v0.6.0 https://github.com/google/glog.git --single-branch && \ +RUN git clone --branch v0.7.1 https://github.com/google/glog.git --single-branch && \ cd glog && \ mkdir build && \ cd build && \ @@ -82,7 +83,7 @@ RUN git clone --branch v0.6.0 https://github.com/google/glog.git --single-branch ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib" # Install Ceres-solver (required by colmap). -RUN git clone --branch 2.1.0 https://ceres-solver.googlesource.com/ceres-solver.git --single-branch && \ +RUN git clone --branch 2.2.0 https://ceres-solver.googlesource.com/ceres-solver.git --single-branch && \ cd ceres-solver && \ git checkout $(git describe --tags) && \ mkdir build && \ @@ -94,7 +95,7 @@ RUN git clone --branch 2.1.0 https://ceres-solver.googlesource.com/ceres-solver. rm -rf ceres-solver # Install colmap. -RUN git clone --branch 3.8 https://github.com/colmap/colmap.git --single-branch && \ +RUN git clone --branch 3.10 https://github.com/colmap/colmap.git --single-branch && \ cd colmap && \ mkdir build && \ cd build && \ @@ -102,6 +103,8 @@ RUN git clone --branch 3.8 https://github.com/colmap/colmap.git --single-branch -DCMAKE_CUDA_ARCHITECTURES=${CUDA_ARCHITECTURES} && \ make -j `nproc` && \ make install && \ + cd colmap/pycolmap && \ + pip3 wheel . -w dist/ && pip3 install dist/pycolmap-*.whl cd ../.. && \ rm -rf colmap @@ -127,25 +130,19 @@ WORKDIR /home/${USERNAME} ENV PATH="${PATH}:/home/${USERNAME}/.local/bin" # Upgrade pip and install packages. -RUN python3.10 -m pip install --no-cache-dir --upgrade pip setuptools==69.5.1 pathtools promise pybind11 omegaconf +RUN python3.10 -m pip install --no-cache-dir --upgrade pip setuptools==74.0.0 pathtools promise pybind11 omegaconf # Install pytorch and submodules # echo "${CUDA_VERSION}" | sed 's/.$//' | tr -d '.' -- CUDA_VERSION -> delete last digit -> delete all '.' RUN CUDA_VER=$(echo "${CUDA_VERSION}" | sed 's/.$//' | tr -d '.') && python3.10 -m pip install --no-cache-dir \ - torch==2.1.2+cu${CUDA_VER} \ - torchvision==0.16.2+cu${CUDA_VER} \ + torch==2.4.0+cu${CUDA_VER} \ + torchvision==0.19.0+cu${CUDA_VER} \ --extra-index-url https://download.pytorch.org/whl/cu${CUDA_VER} # Install tiny-cuda-nn (we need to set the target architectures as environment variable first). ENV TCNN_CUDA_ARCHITECTURES=${CUDA_ARCHITECTURES} RUN python3.10 -m pip install --no-cache-dir git+https://github.com/NVlabs/tiny-cuda-nn.git#subdirectory=bindings/torch -# Install pycolmap, required by hloc. -RUN git clone --branch v0.4.0 --recursive https://github.com/colmap/pycolmap.git && \ - cd pycolmap && \ - python3.10 -m pip install --no-cache-dir . && \ - cd .. - # Install hloc 1.4 as alternative feature detector and matcher option for nerfstudio. RUN git clone --branch master --recursive https://github.com/cvg/Hierarchical-Localization.git && \ cd Hierarchical-Localization && \ @@ -160,12 +157,13 @@ RUN git clone --branch v1.0 --recursive https://github.com/cvg/pyceres.git && \ cd .. # Install pixel perfect sfm. -RUN git clone --recursive https://github.com/cvg/pixel-perfect-sfm.git && \ - cd pixel-perfect-sfm && \ - git reset --hard 40f7c1339328b2a0c7cf71f76623fb848e0c0357 && \ - git clean -df && \ - python3.10 -m pip install --no-cache-dir -e . && \ - cd .. +# it is still upgrading: https://github.com/cvg/pixel-perfect-sfm/pull/138 +# RUN git clone --recursive https://github.com/cvg/pixel-perfect-sfm.git && \ +# cd pixel-perfect-sfm && \ +# git reset --hard 40f7c1339328b2a0c7cf71f76623fb848e0c0357 && \ +# git clean -df && \ +# python3.10 -m pip install --no-cache-dir -e . && \ +# cd .. # Copy nerfstudio folder and give ownership to user. COPY --chown=${USER_UID}:${USER_GID} . /home/${USERNAME}/nerfstudio From 00c9c783024ce72a5661c5e9998a046bda3ed524 Mon Sep 17 00:00:00 2001 From: Johnny Date: Fri, 30 Aug 2024 15:11:11 +0200 Subject: [PATCH 03/15] Update Dockerfile --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index d4d7617102..b5149e8fec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -ARG CUDA_VERSION=11.8.0 -ARG OS_VERSION=22.04 +ARG CUDA_VERSION=12.6.0 +ARG OS_VERSION=24.04 # Define base image. FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${OS_VERSION} ARG CUDA_VERSION @@ -146,12 +146,11 @@ RUN python3.10 -m pip install --no-cache-dir git+https://github.com/NVlabs/tiny- # Install hloc 1.4 as alternative feature detector and matcher option for nerfstudio. RUN git clone --branch master --recursive https://github.com/cvg/Hierarchical-Localization.git && \ cd Hierarchical-Localization && \ - git checkout v1.4 && \ - python3.10 -m pip install --no-cache-dir -e . && \ + pip3 wheel --no-deps --use-feature=fast-deps . -w dist/ && pip3 install dist/hloc-*.whl && \ cd .. # Install pyceres from source -RUN git clone --branch v1.0 --recursive https://github.com/cvg/pyceres.git && \ +RUN git clone --branch v2.3 --recursive https://github.com/cvg/pyceres.git && \ cd pyceres && \ python3.10 -m pip install --no-cache-dir -e . && \ cd .. From d4a17d65a48fddd170fa4bc5029e4467a07717e9 Mon Sep 17 00:00:00 2001 From: Johnny Date: Fri, 30 Aug 2024 15:13:16 +0200 Subject: [PATCH 04/15] Update publish.yml --- .github/workflows/publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b75984535a..5118abb949 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,11 +12,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.10' - name: Install dependencies run: | python -m pip install build twine From b8f08f09fe9577d709bdabc09716d566d7e7e224 Mon Sep 17 00:00:00 2001 From: Johnny Date: Fri, 30 Aug 2024 15:14:14 +0200 Subject: [PATCH 05/15] Update doc.yml --- .github/workflows/doc.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index d2637429ca..81bf553ef0 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -12,10 +12,10 @@ jobs: docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.10' - name: Install dependencies run: | pip install uv @@ -25,7 +25,7 @@ jobs: run: | sphinx-build docs _build -W --keep-going - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: publish_branch: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} From 2549c1def8da4c59ea954ff2ddb7119cb9d1cfdd Mon Sep 17 00:00:00 2001 From: Johnny Date: Fri, 30 Aug 2024 15:15:06 +0200 Subject: [PATCH 06/15] Update core_code_checks.yml --- .github/workflows/core_code_checks.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/core_code_checks.yml b/.github/workflows/core_code_checks.yml index 35ed0f1ca5..04d0b1b72b 100644 --- a/.github/workflows/core_code_checks.yml +++ b/.github/workflows/core_code_checks.yml @@ -14,12 +14,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.8.13 - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - name: Set up Python 3.10.12 + uses: actions/setup-python@v5 with: - python-version: '3.8.13' - - uses: actions/cache@v2 + python-version: '3.10.12' + - uses: actions/cache@v4 with: path: ${{ env.pythonLocation }} key: ${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }} From 4a66e9e383d534276ad8614876e3d10b11b6f34a Mon Sep 17 00:00:00 2001 From: Johnny Date: Fri, 30 Aug 2024 15:18:22 +0200 Subject: [PATCH 07/15] Update docker-compose.yml --- .devcontainer/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 5cbf79cc37..c0e23cf172 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -1,4 +1,4 @@ -version: "3.8" +version: "3.9" services: nerfstudio: @@ -25,4 +25,4 @@ services: devices: - driver: nvidia count: 1 - capabilities: [ gpu ] \ No newline at end of file + capabilities: [ gpu ] From 517955443bb500ccbcee97c2104667c9675ebbba Mon Sep 17 00:00:00 2001 From: Johnny Date: Fri, 30 Aug 2024 15:20:54 +0200 Subject: [PATCH 08/15] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b5149e8fec..fca4e13977 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG CUDA_VERSION=12.6.0 +ARG CUDA_VERSION=12.4.0 ARG OS_VERSION=24.04 # Define base image. FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${OS_VERSION} From 0c9c8f14b9b5599adda3cc7c264756e241832cf7 Mon Sep 17 00:00:00 2001 From: Johnny Date: Fri, 30 Aug 2024 16:59:09 +0200 Subject: [PATCH 09/15] Update core_code_checks.yml --- .github/workflows/core_code_checks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/core_code_checks.yml b/.github/workflows/core_code_checks.yml index 04d0b1b72b..f78ef988bd 100644 --- a/.github/workflows/core_code_checks.yml +++ b/.github/workflows/core_code_checks.yml @@ -15,10 +15,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.10.12 + - name: Set up Python 3.8.13 uses: actions/setup-python@v5 with: - python-version: '3.10.12' + python-version: '3.8.13' - uses: actions/cache@v4 with: path: ${{ env.pythonLocation }} From fff1b598f57931221310935ea2c10e15abd85d6c Mon Sep 17 00:00:00 2001 From: Johnny Date: Fri, 30 Aug 2024 17:18:35 +0200 Subject: [PATCH 10/15] Update pixi.toml --- pixi.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixi.toml b/pixi.toml index ad2eee6aec..1c99ea5e72 100644 --- a/pixi.toml +++ b/pixi.toml @@ -1,7 +1,7 @@ [project] name = "nerfstudio" description = "All-in-one repository for state-of-the-art NeRFs" -channels = ["nvidia/label/cuda-11.8.0", "nvidia", "conda-forge", "pytorch"] +channels = ["nvidia/label/cuda-12.4.0", "nvidia", "conda-forge", "pytorch"] platforms = ["linux-64"] [system-requirements] From e26dc1fef8cc7a76b20196e0d45eb5d63aef8691 Mon Sep 17 00:00:00 2001 From: Johnny Date: Fri, 30 Aug 2024 17:20:25 +0200 Subject: [PATCH 11/15] Update pixi.toml --- pixi.toml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pixi.toml b/pixi.toml index 1c99ea5e72..68dc42cf98 100644 --- a/pixi.toml +++ b/pixi.toml @@ -21,14 +21,14 @@ train-example-nerf = {cmd="ns-train nerfacto --data data/nerfstudio/dozer/", dep [dependencies] -python = ">=3.8,<3.11" +python = ">=3.8,<3.12" 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" +cuda = {version = "*", channel="nvidia/label/cuda-12.4.0"} +pytorch-cuda = {version = "12.4.*", channel="pytorch"} +pytorch = {version = ">=2.2.0,<2.5", channel="pytorch"} +torchvision = {version = ">=0.17.0,<0.20", channel="pytorch"} +pyarrow = ">=15.0.2,<17.0.0" +colmap = ">=3.9.1,<3.11" [pypi-dependencies] From e567aec9c0b200ec42ecdcf18d2c07dbc8fed808 Mon Sep 17 00:00:00 2001 From: Johnny Date: Fri, 30 Aug 2024 17:21:04 +0200 Subject: [PATCH 12/15] Update pixi.toml --- pixi.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixi.toml b/pixi.toml index 68dc42cf98..1be506ca1a 100644 --- a/pixi.toml +++ b/pixi.toml @@ -27,7 +27,7 @@ cuda = {version = "*", channel="nvidia/label/cuda-12.4.0"} pytorch-cuda = {version = "12.4.*", channel="pytorch"} pytorch = {version = ">=2.2.0,<2.5", channel="pytorch"} torchvision = {version = ">=0.17.0,<0.20", channel="pytorch"} -pyarrow = ">=15.0.2,<17.0.0" +pyarrow = ">=15.0.2,<18.0.0" colmap = ">=3.9.1,<3.11" From e1f6852289cc12306b1961877b453aaf55e5b095 Mon Sep 17 00:00:00 2001 From: Johnny Date: Sun, 1 Sep 2024 21:08:11 +0200 Subject: [PATCH 13/15] Update pyproject.toml --- pyproject.toml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 21ec1d1762..b849482839 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,12 +31,12 @@ dependencies = [ "mediapy>=1.1.0", "msgpack>=1.0.4", "msgpack_numpy>=0.4.8", - "nerfacc==0.5.2", + "nerfacc==0.5.3", "open3d>=0.16.0", "opencv-python-headless==4.10.0.84", "Pillow>=10.3.0", "plotly>=5.7.0", - "protobuf<=3.20.3,!=3.20.0", + "protobuf>=3.20.3", # TODO(1480) enable when pycolmap windows wheels are available # "pycolmap==0.3.0", "pymeshlab>=2022.2.post2; platform_machine != 'arm64'", @@ -50,7 +50,7 @@ dependencies = [ "requests", "rich>=12.5.1", "scikit-image>=0.19.3", - "splines==0.3.0", + "splines==0.3.2", "tensorboard>=2.13.0", "torch>=1.13.1", "torchvision>=0.14.1", @@ -61,8 +61,8 @@ dependencies = [ "wandb>=0.13.3", "xatlas", "trimesh>=3.20.2", - "timm==0.6.7", - "gsplat==1.0.0", + "timm==1.0.9", + "gsplat==1.3.0", "pytorch-msssim", "pathos", "packaging", @@ -78,33 +78,33 @@ dependencies = [ # Generative related dependencies gen = [ - "diffusers==0.16.1", - "transformers==4.29.2", - "accelerate==0.19.0", - "bitsandbytes==0.39.0", - "sentencepiece==0.1.99", + "diffusers==0.30.2", + "transformers==4.44.2", + "accelerate==0.33.0", + "bitsandbytes==0.43.3", + "sentencepiece==0.2.0", ] # Development packages dev = [ - "pre-commit==3.3.2", - "pytest==7.1.2", - "pytest-xdist==2.5.0", - "typeguard==2.13.3", + "pre-commit==3.8.0", + "pytest==8.3.2", + "pytest-xdist==3.6.1", + "typeguard==4.3.0", "ruff>=0.6.1", - "sshconf==0.2.5", + "sshconf==0.2.7", "pycolmap>=3.10.0", # NOTE: pycolmap==0.3.0 is not available on newer python versions - "diffusers==0.16.1", + "diffusers==0.30.2", "opencv-stubs==0.0.7", - "transformers==4.29.2", - "pyright==1.1.331", + "transformers==4.44.2", + "pyright==1.1.378", # NOTE: Disabling projectaria-tools because it doesn't have prebuilt windows wheels # Syntax comes from here: https://pip.pypa.io/en/stable/reference/requirement-specifiers/ "projectaria-tools>=1.3.1; sys_platform != 'win32'", # pin torch to <=2.1 to fix https://github.com/pytorch/pytorch/issues/118736 - "torch>=1.13.1,<2.2", - "awscli==1.33.18" + "torch>=1.13.1,<2.5", + "awscli==1.34.10" ] # Documentation related packages From e14a0ee5e1efcc04a3b085c96f1e890485c0dc0d Mon Sep 17 00:00:00 2001 From: Johnny Date: Sun, 1 Sep 2024 21:09:27 +0200 Subject: [PATCH 14/15] Update pyproject.toml --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b849482839..1ba670f563 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [build-system] -requires = ["setuptools>=61.0"] +requires = ["setuptools>=74.0.0"] build-backend = "setuptools.build_meta" [project] name = "nerfstudio" -version = "1.1.4" +version = "1.1.5" description = "All-in-one repository for state-of-the-art NeRFs" readme = "README.md" license = { text="Apache 2.0"} From 1ae4f6c1dd69ea1fb371d8255b510f9389cc4ab5 Mon Sep 17 00:00:00 2001 From: Johnny Date: Sun, 1 Sep 2024 21:10:55 +0200 Subject: [PATCH 15/15] Update core_code_checks.yml --- .github/workflows/core_code_checks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/core_code_checks.yml b/.github/workflows/core_code_checks.yml index f78ef988bd..bbfead9a24 100644 --- a/.github/workflows/core_code_checks.yml +++ b/.github/workflows/core_code_checks.yml @@ -15,10 +15,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.8.13 + - name: Set up Python 3.9.13 uses: actions/setup-python@v5 with: - python-version: '3.8.13' + python-version: '3.9.13' - uses: actions/cache@v4 with: path: ${{ env.pythonLocation }}