Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails in Docker #934

Open
bks-khaoula opened this issue Oct 3, 2024 · 0 comments
Open

Build fails in Docker #934

bks-khaoula opened this issue Oct 3, 2024 · 0 comments

Comments

@bks-khaoula
Copy link

This is my Dockerfile content:

# Use Ubuntu 20.04 as base image
FROM ubuntu:20.04

# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive

# Install system dependencies
RUN apt-get update && apt-get install -y \
    build-essential \
    cmake \
    git \
    g++ \
    python3 \
    python3-pip \
    wget \
    libsuitesparse-dev \
    qtbase5-dev \
    qt5-qmake \
    libqglviewer-dev-qt5 \
    libboost-thread-dev \
    libboost-filesystem-dev \
    libglew-dev \
    libgl1-mesa-dev \
    libglu1-mesa-dev \
    freeglut3-dev \
    libegl1-mesa-dev \
    libwayland-dev \
    libxkbcommon-dev \
    wayland-protocols \
    libepoxy-dev \
    libgtk-3-dev \
    pkg-config \
    libavcodec-dev \
    libavformat-dev \
    libswscale-dev \
    libtbb2 \
    libtbb-dev \
    libjpeg-dev \
    libpng-dev \
    libtiff-dev \
    libdc1394-22-dev \
    python3-dev \
    python3-numpy \
    && apt-get clean

# Install Eigen3
RUN git clone https://gitlab.com/libeigen/eigen.git && \
    cd eigen && \
    git checkout 3.4.0 && \
    mkdir build && cd build && \
    cmake .. && make -j$(nproc) && make install

# Download OpenCV .tar and extract it
RUN wget -O opencv.tar.gz https://github.com/opencv/opencv/archive/4.4.0.tar.gz && \
    tar -xvzf opencv.tar.gz && \
    mv opencv-4.4.0 opencv && \
    rm opencv.tar.gz && \
    cd opencv && \
    mkdir build && cd build && \
    cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local .. && \
    make -j$(nproc) && make install && ldconfig

# Install DBoW2 (Thirdparty library for ORB-SLAM3)
RUN git clone https://github.com/dorian3d/DBoW2.git /DBoW2 && \
    cd /DBoW2 && \
    mkdir build && cd build && \
    cmake .. && make -j$(nproc) && make install

# Install g2o (Optimization framework for ORB-SLAM3)
RUN git clone https://github.com/RainerKuemmerle/g2o.git /g2o && \
    cd /g2o && \
    mkdir build && cd build && \
    cmake .. && make -j$(nproc) && make install

# Install Pangolin for visualization
RUN git clone https://github.com/stevenlovegrove/Pangolin.git && \
    cd Pangolin && \
    mkdir build && cd build && \
    cmake .. && make -j$(nproc) && make install

# Clone ORB-SLAM3 repository
RUN git clone https://github.com/UZ-SLAMLab/ORB_SLAM3.git /ORB_SLAM3

# Set working directory
WORKDIR /ORB_SLAM3

# Build ORB-SLAM3 and its Thirdparty libraries (DBoW2 and g2o)
RUN chmod +x build.sh && ./build.sh -j$(nproc)

# Clean up unnecessary files to reduce image size
RUN rm -rf /var/lib/apt/lists/* \
    /opencv \
    /eigen \
    /Pangolin

# Set default command to bash
CMD ["bash"]

This is the error I'm getting:

Capture d’écran du 2024-10-03 15-44-48

what should I do to fix this? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant