Skip to content

One cmd Dockerfile suggestion #1235

@minyeong-jeong

Description

@minyeong-jeong

Hi, thanks for making a great repo for reconstruction. While trying to run the repository with Dockerfiles, there were quite few errors. Debugging the problem was also difficult because the dockerfiles were actually .sh files, and there were COPY commands on the early process, which made docker caching almost meaningless. I do get that to accommodate various scenarios, that is inevitable. So I made a CUDA version dockerfile that is simple and no COPY commands in the early process. This works with one command sudo docker build -t openmvs:latest . when the dockerfile is located in the root directory.

# MUST GIT CLONE OPENMVS WITH --recurse-submodules BEFORE RUNNING
FROM nvidia/cuda:12.6.3-cudnn-devel-ubuntu24.04

# Set environment variables to avoid interactive prompts during install
ENV DEBIAN_FRONTEND=noninteractive

# Update and install basic development tools
RUN apt-get update && apt-get install -y \
        build-essential \
        cmake \
        git \
        curl \
        zip \
        unzip \
        ninja-build \
        pkg-config \
        ca-certificates \
        autoconf \
        autoconf-archive \
        libtool \
        libx11-dev \
        libxft-dev \
        libxext-dev \
        python3 \
        python3-dev \
        python3-pip \
        bison \
        libxi-dev \
        libxtst-dev \
        x11-xserver-utils \
        libxrandr-dev \
        libxinerama-dev \
        libxcursor-dev \
        xorg-dev \
        libglu1-mesa-dev \
        # vim
        && rm -rf /var/lib/apt/lists/*

RUN pip3 install Jinja2 --break-system-packages

ENV VCPKG_ROOT=/opt/vcpkg
ENV PAHT="$VCPKG_ROOT:$PATH"

RUN git clone https://github.com/microsoft/vcpkg.git $VCPKG_ROOT \
    && cd $VCPKG_ROOT \
    && ./bootstrap-vcpkg.sh

WORKDIR /workspace

COPY . .

RUN mkdir make && cd make
RUN cmake ..
RUN cmake --build . -j4
RUN cmake --install .

CMD ["/bin/bash"]
~

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions