[TOC]
https://vast.ai/console/create/
- Images?
- tensorflow/tensorflow:latest-gpu (commands below) --> w/ Jupyter
- 11.2.2-devel-ubuntu20.04 --> w/ SSH
As root on 18.04.1-Ubuntu (Docker tensorflow/tensorflow:latest-gpu):
apt-get update && \
apt-get install -y \
git \
cmake \
htop \
build-essential \
libboost-program-options-dev \
libboost-filesystem-dev \
libboost-graph-dev \
libboost-system-dev \
libboost-test-dev \
libeigen3-dev \
libsuitesparse-dev \
libfreeimage-dev \
libgoogle-glog-dev \
libgflags-dev \
libglew-dev \
libglu1-mesa-dev \
mesa-common-dev \
libatlas-base-dev \
libsuitesparse-dev \
qtbase5-dev \
libqt5opengl5-dev \
libcgal-dev
# nvcc --version # 11.2, so:
# apt-get install -y cuda-libraries-dev-11-2 # Includes libcurand-dev
( git clone https://ceres-solver.googlesource.com/ceres-solver && \
cd ceres-solver && \
git checkout $(git describe --tags) && \
mkdir build && \
cd build && \
cmake .. -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF && \
make -j && \
make install )
( git clone https://github.com/colmap/colmap.git && \
cd colmap && \
git checkout dev && \
mkdir -p build && \
cd build && \
cmake .. \
-DCMAKE_PREFIX_PATH=/usr/local \
-DOPENGL_ENABLED=0 \
-DGUI_ENABLED=0 && \
-DTESTS_ENABLED=0 && \
-DCMAKE_CXX_FLAGS="-DGL_LUMINANCE=0x1909 -DGL_UNSIGNED_BYTE=0x1401" && \
make -j$(( $(nproc --all) - 1 )) && \
make install )
( cd ceres-solver/build ; tar -czvf ../../ceres-solver_build.tar.gz . )
( cd colmap/build ; tar -czvf ../../colmap_build.tar.gz . )
# Now these can be downloaded from Jupyter for future usemkdir -p colmap ceres-solver
tar -xzvf colmap_build.tar.gz -C colmap/build
tar -xzvf ceres-solver_build.tar.gz -C ceres-solver/build
unzip Pictures.zip
mkdir Recon
# If multiple GPUs, add --PatchMatchStereo.gpu_index=0,0,1,1 for instance (2 threads per GPU)
# (see https://colmap.github.io/faq.html#multi-gpu-support-in-dense-reconstruction)
# General speedup instructions: https://colmap.github.io/faq.html#speedup-dense-reconstruction
time /usr/local/bin/colmap automatic_reconstructor \
--image_path Pictures \
--workspace_path Recon
tar -czvf Recon.tar.gz Recon