Skip to content

Latest commit

 

History

History

docker

Docker Build Instructions

TL;DR

Here, we assume that Docker is already installed and can access the GPU. If you did not install Docker yet, please refer to the complete instructions below.

git clone --recursive https://github.com/cg-tuwien/StatMC.git
cd StatMC/
sudo docker build -t statmc -f ./docker/Dockerfile . --network=host
sudo docker run -d -i -t --name statmc -v .:/StatMC --gpus all --network=host statmc
sudo docker exec -it statmc bash
./docker/install-dependencies-container.sh
./scripts/_build.sh
./scripts/_download-scenes.sh
./scripts/1-staircase.sh

Setup

  1. If not already done, check out our repository:

    git clone --recursive https://github.com/cg-tuwien/StatMC.git
    cd StatMC/

    Important: Make sure all shell scripts inside the scripts/ directory have UNIX line endings (\n). On Windows, Git might convert them automatically to Windows-style line endings (\r\n) which will result in errors when executed with bash inside the container.

  2. Optional: if not already installed, install the NVIDIA driver and CUDA on the host:

    sudo ./scripts/_install-dependencies.sh

    If you reboot, make sure to go back into the StatMC/ directory afterwards.

  3. Optional: if not already installed, install Docker and the NVIDIA Container Toolkit on the host:

    ./docker/install_docker.sh
    ./docker/install_nvidia_container_toolkit.sh 
  4. Create the container:

    sudo docker build -t statmc -f ./docker/Dockerfile . --network=host
  5. Start the container in detached mode:

    sudo docker run -d -i -t --name statmc -v .:/StatMC --gpus all --network=host statmc

    This enables the GPU for the container and mounts the current (StatMC) directory (as a persistent volume) at /StatMC inside the container.

  6. If not already done, make the shell scripts for Docker executable:

    chmod +x ./docker/install-dependencies-container.sh
  7. Open an interactive shell inside the container:

    sudo docker exec -it statmc bash

    Inside the interactive shell:

    1. Install dependencies inside the container, compile the sources, and download scenes:

      ./docker/install-dependencies-container.sh
      ./scripts/_build.sh
      ./scripts/_download-scenes.sh
    2. Compute the first result from the paper.

      ./scripts/1-staircase.sh