From 82f13754079897116c12773987ebd28067c4c56d Mon Sep 17 00:00:00 2001 From: Ian Baldwin Date: Wed, 6 Apr 2022 09:00:33 -0700 Subject: [PATCH] Added pinning to remote dependencies The combination of ceres/colmap/apex HEAD versions do not work, this pins to known good combinations. --- Docker/Dockerfile | 41 ++++++++++++++++++++++++----------------- inference_colmap.py | 2 +- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index 3351fc0..4ae6f77 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -1,4 +1,4 @@ -FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04 +FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04 RUN apt-get update && apt-get install -y \ cmake \ @@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y \ git \ rsync \ sudo \ - zip \ + zip \ vim \ ssh \ unzip \ @@ -27,25 +27,28 @@ RUN apt-get update && apt-get install -y \ libxi-dev \ libatlas-base-dev \ libsuitesparse-dev \ - libcgal-dev \ + libcgal-dev \ libeigen3-dev \ + libmetis-dev \ && rm -rf /var/lib/apt/lists/* # Install Ceres Solver RUN git clone https://ceres-solver.googlesource.com/ceres-solver RUN mkdir -p ceres-solver/build -WORKDIR ceres-solver/build -RUN cmake -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF .. && make -j$(nproc) && make install && make clean +WORKDIR ceres-solver +RUN git checkout 1.14.0 +WORKDIR build +RUN cmake -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF .. && make -j$(nproc) && make install && make clean WORKDIR / # Install Colmap RUN git clone https://github.com/colmap/colmap -RUN mkdir -p colmap/build -WORKDIR colmap/build +WORKDIR colmap +RUN git reset --hard 30521f1 +WORKDIR build RUN cmake -DCMAKE_BUILD_TYPE=Release -DTESTS_ENABLED=OFF .. && make -j$(nproc) && make install && make clean WORKDIR / - # Install Miniconda RUN curl -so /miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \ && chmod +x /miniconda.sh \ @@ -54,7 +57,6 @@ RUN curl -so /miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest ENV PATH=/miniconda/bin:$PATH - # Create a Python 3.6 environment RUN conda install -y conda-build \ && conda create -y --name py36 python=3.6.7 \ @@ -70,17 +72,21 @@ RUN conda install -y pytorch=1.5.0 torchvision=0.6.0 cudatoolkit=10.2 -c pytorch RUN conda install opencv RUN pip install \ - open3d>=0.10.0.0 \ - trimesh>=3.7.6 \ - pyquaternion>=0.9.5 \ - pytorch-lightning>=0.8.5 \ + open3d==0.10.0.0 \ + trimesh==3.7.6 \ + pyquaternion==0.9.5 \ + protobuf===3.6.0 \ + pytorch-lightning==0.8.5 \ pyrender>=0.1.43 \ scikit-image RUN python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.5/index.html # For 16bit mixed precision RUN git clone https://github.com/NVIDIA/apex -RUN pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./apex +WORKDIR apex +RUN git reset --hard 3fe10b5597ba14a748ebb271a6ab97c09c5701ac +RUN pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./ +WORKDIR / # add headless support for pyrender # https://pyrender.readthedocs.io/en/latest/install/index.html @@ -91,13 +97,14 @@ RUN apt update -y \ && apt install -f -y # install a Compatible Fork of PyOpenGL RUN git clone https://github.com/mmatl/pyopengl.git \ - && pip install ./pyopengl - + && cd pyopengl \ + && git reset --hard 76d1261 \ + && pip install . RUN echo "export PATH=$CONDA_PREFIX/bin:$PATH" >> /etc/profile RUN echo "export PYTHONPATH=/miniconda/envs/lib/python3.6/site-packages:$PYTHONPATH" >> /etc/profile RUN echo "export NCCL_LL_THRESHOLD=0" >> /etc/profile RUN echo "umask 002" >> /etc/profile +RUN echo "source activate py36" > ~/.bashrc ENV NCCL_LL_THRESHOLD=0 - diff --git a/inference_colmap.py b/inference_colmap.py index 6c3dc38..2f7f8c0 100644 --- a/inference_colmap.py +++ b/inference_colmap.py @@ -171,4 +171,4 @@ def main(): for scene in scenes: process(scene, args.pathout, args.stride, args.scale) -main() \ No newline at end of file +main()