mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-25 10:29:51 +08:00
Add --no-cache-dir option to pip install in Dockerfile (#2739)
This commit is contained in:
1 file changed
+9
-9
+9
-9
@@ -119,33 +119,33 @@ ENV PATH="${PATH}:/home/user/.local/bin"
|
|||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
# Upgrade pip and install packages.
|
# Upgrade pip and install packages.
|
||||||
RUN python3.10 -m pip install --upgrade pip setuptools pathtools promise pybind11
|
RUN python3.10 -m pip install --no-cache-dir --upgrade pip setuptools pathtools promise pybind11
|
||||||
# Install pytorch and submodules
|
# Install pytorch and submodules
|
||||||
RUN CUDA_VER=${CUDA_VERSION%.*} && CUDA_VER=${CUDA_VER//./} && python3.10 -m pip install \
|
RUN CUDA_VER=${CUDA_VERSION%.*} && CUDA_VER=${CUDA_VER//./} && python3.10 -m pip install --no-cache-dir \
|
||||||
torch==2.0.1+cu${CUDA_VER} \
|
torch==2.0.1+cu${CUDA_VER} \
|
||||||
torchvision==0.15.2+cu${CUDA_VER} \
|
torchvision==0.15.2+cu${CUDA_VER} \
|
||||||
--extra-index-url https://download.pytorch.org/whl/cu${CUDA_VER}
|
--extra-index-url https://download.pytorch.org/whl/cu${CUDA_VER}
|
||||||
# Install tynyCUDNN (we need to set the target architectures as environment variable first).
|
# Install tynyCUDNN (we need to set the target architectures as environment variable first).
|
||||||
ENV TCNN_CUDA_ARCHITECTURES=${CUDA_ARCHITECTURES}
|
ENV TCNN_CUDA_ARCHITECTURES=${CUDA_ARCHITECTURES}
|
||||||
RUN python3.10 -m pip install git+https://github.com/NVlabs/tiny-cuda-nn.git@v1.6#subdirectory=bindings/torch
|
RUN python3.10 -m pip install --no-cache-dir git+https://github.com/NVlabs/tiny-cuda-nn.git@v1.6#subdirectory=bindings/torch
|
||||||
|
|
||||||
# Install pycolmap, required by hloc.
|
# Install pycolmap, required by hloc.
|
||||||
RUN git clone --branch v0.4.0 --recursive https://github.com/colmap/pycolmap.git && \
|
RUN git clone --branch v0.4.0 --recursive https://github.com/colmap/pycolmap.git && \
|
||||||
cd pycolmap && \
|
cd pycolmap && \
|
||||||
python3.10 -m pip install . && \
|
python3.10 -m pip install --no-cache-dir . && \
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Install hloc 1.4 as alternative feature detector and matcher option for nerfstudio.
|
# 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 && \
|
RUN git clone --branch master --recursive https://github.com/cvg/Hierarchical-Localization.git && \
|
||||||
cd Hierarchical-Localization && \
|
cd Hierarchical-Localization && \
|
||||||
git checkout v1.4 && \
|
git checkout v1.4 && \
|
||||||
python3.10 -m pip install -e . && \
|
python3.10 -m pip install --no-cache-dir -e . && \
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Install pyceres from source
|
# Install pyceres from source
|
||||||
RUN git clone --branch v1.0 --recursive https://github.com/cvg/pyceres.git && \
|
RUN git clone --branch v1.0 --recursive https://github.com/cvg/pyceres.git && \
|
||||||
cd pyceres && \
|
cd pyceres && \
|
||||||
python3.10 -m pip install -e . && \
|
python3.10 -m pip install --no-cache-dir -e . && \
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Install pixel perfect sfm.
|
# Install pixel perfect sfm.
|
||||||
@@ -153,10 +153,10 @@ RUN git clone --recursive https://github.com/cvg/pixel-perfect-sfm.git && \
|
|||||||
cd pixel-perfect-sfm && \
|
cd pixel-perfect-sfm && \
|
||||||
git reset --hard 40f7c1339328b2a0c7cf71f76623fb848e0c0357 && \
|
git reset --hard 40f7c1339328b2a0c7cf71f76623fb848e0c0357 && \
|
||||||
git clean -df && \
|
git clean -df && \
|
||||||
python3.10 -m pip install -e . && \
|
python3.10 -m pip install --no-cache-dir -e . && \
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
RUN python3.10 -m pip install omegaconf
|
RUN python3.10 -m pip install --no-cache-dir omegaconf
|
||||||
# Copy nerfstudio folder and give ownership to user.
|
# Copy nerfstudio folder and give ownership to user.
|
||||||
ADD . /home/user/nerfstudio
|
ADD . /home/user/nerfstudio
|
||||||
USER root
|
USER root
|
||||||
@@ -165,7 +165,7 @@ USER ${USER_ID}
|
|||||||
|
|
||||||
# Install nerfstudio dependencies.
|
# Install nerfstudio dependencies.
|
||||||
RUN cd nerfstudio && \
|
RUN cd nerfstudio && \
|
||||||
python3.10 -m pip install -e . && \
|
python3.10 -m pip install --no-cache-dir -e . && \
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Change working directory
|
# Change working directory
|
||||||
|
|||||||
Reference in new issue
Block a user