diff --git a/Dockerfile b/Dockerfile index 6cd4e058f0..be9e45cd18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -81,11 +81,12 @@ RUN git clone https://github.com/colmap/colmap.git && \ # Upgrade pip and install dependencies. # pip install torch==2.2.2 torchvision==0.17.2 --index-url https://download.pytorch.org/whl/cu118 && \ -RUN pip install --no-cache-dir --upgrade pip 'setuptools<70.0.0' && \ +RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \ + pip install --no-cache-dir 'setuptools<70.0.0' && \ pip install --no-cache-dir torch==2.1.2+cu118 torchvision==0.16.2+cu118 'numpy<2.0.0' --extra-index-url https://download.pytorch.org/whl/cu118 && \ git clone --branch master --recursive https://github.com/cvg/Hierarchical-Localization.git /opt/hloc && \ cd /opt/hloc && git checkout v1.4 && python3.10 -m pip install --no-cache-dir . && cd ~ && \ - TCNN_CUDA_ARCHITECTURES="${CUDA_ARCHITECTURES}" pip install --no-cache-dir "git+https://github.com/NVlabs/tiny-cuda-nn.git@b3473c81396fe927293bdfd5a6be32df8769927c#subdirectory=bindings/torch" && \ + TCNN_CUDA_ARCHITECTURES="${CUDA_ARCHITECTURES}" pip install --no-cache-dir --no-build-isolation "git+https://github.com/NVlabs/tiny-cuda-nn.git@b3473c81396fe927293bdfd5a6be32df8769927c#subdirectory=bindings/torch" && \ pip install --no-cache-dir pycolmap==0.6.1 pyceres==2.1 omegaconf==2.3.0 # Install gsplat and nerfstudio. @@ -97,8 +98,10 @@ RUN pip install --no-cache-dir --upgrade pip 'setuptools<70.0.0' && \ COPY --from=source /tmp/nerfstudio/ /tmp/nerfstudio RUN export TORCH_CUDA_ARCH_LIST="$(echo "$CUDA_ARCHITECTURES" | tr ';' '\n' | awk '$0 > 70 {print substr($0,1,1)"."substr($0,2)}' | tr '\n' ' ' | sed 's/ $//')" && \ export MAX_JOBS=4 && \ + pip install --no-cache-dir torch==2.1.2+cu118 torchvision==0.16.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118 && \ + pip install --upgrade setuptools && \ GSPLAT_VERSION="$(sed -n 's/.*gsplat==\s*\([^," '"'"']*\).*/\1/p' /tmp/nerfstudio/pyproject.toml)" && \ - pip install --no-cache-dir git+https://github.com/nerfstudio-project/gsplat.git@v${GSPLAT_VERSION} && \ + pip install --no-cache-dir --no-build-isolation git+https://github.com/nerfstudio-project/gsplat.git@v${GSPLAT_VERSION} && \ pip install --no-cache-dir /tmp/nerfstudio 'numpy<2.0.0' && \ rm -rf /tmp/nerfstudio diff --git a/colab/demo.ipynb b/colab/demo.ipynb index d9f5ed9826..bbb3557ab3 100644 --- a/colab/demo.ipynb +++ b/colab/demo.ipynb @@ -61,6 +61,25 @@ " * Feel free to create an issue on our [GitHub repo](https://github.com/nerfstudio-project/nerfstudio).\n" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Sequence of installations required for notebook to run with Python 3.10\n", + "!pip install colab-xterm\n", + "%reload_ext colabxterm\n", + "!apt-get update -y\n", + "!apt-get install python3.10 python3.10-distutils\n", + "!update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10\n", + "!update-alternatives --config python3\n", + "!apt-get install python3-pip\n", + "!python3 -m pip install --upgrade pip --user\n", + "!sudo apt remove python3-blinker\n", + "!pip install --force-reinstall \"numpy<2.0.0\"" + ] + }, { "cell_type": "code", "execution_count": null, @@ -253,13 +272,11 @@ "# @title # Render Video { vertical-output: true }\n", "# @markdown