dmlc-xgboost
SUCCESS
17m 01s
History Source
SummaryIterations1Transcript15Dockerfile
01Iteration 1
WRITEWriteFile· step #1
1s
Dockerfile1089 bytes written
text49 lines · 1089 chars
# Multi-stage build for XGBoost from source on Ubuntu jammy

FROM ubuntu:jammy-20260210.1 as builder

# Install build dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        build-essential \
        cmake \
        git \
        ca-certificates \
        pkg-config \
        python3-pip \
        libopenmpi-dev \
        openmpi-bin \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /workspace

# Copy source
COPY . .

# Configure and build
RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build -j$(nproc)

# Install the built artifacts to /usr/local
RUN cmake --install build

FROM ubuntu:jammy-20260210.1 as runtime

# Runtime dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        libstdc++6 \
        ca-certificates \
        pkg-config \
    && rm -rf /var/lib/apt/lists/*

# Copy installed artifacts from builder
COPY --from=builder /usr/local /usr/local

# Ensure dynamic linker can find libs
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

WORKDIR /workspace

CMD ["/bin/bash"]
WRITEWriteFile· step #2
0s
.dockerignore207 bytes written
dockerignore24 lines · 207 chars
# Python virtual environments and caches
venv/
__pycache__/
*.pyc
*.pyo
*.pyd

# Git and SVN
.git/
.gitignore

# CMake and build
CMakeFiles/
CMakeCache.txt
build/
dist/
*.cmake

# Misc
.DS_Store
.env
*.log

VERIFYVerifyBuild· step #3
1m 51s
VerifyBuildbuild_failed
Build error
Summary (under 1500 chars):

- Exact error message and exit code:
  The process exited with code 1 during the build step:
  "ERROR: process \"/bin/sh -c cmake -S . -B build -DCMAKE_BUILD_TYPE=Release\" did not complete successfully: exit code: 1"

  CMake errors:
  - "The source directory /workspace/dmlc-core does not contain a CMakeLists.txt file."
  - "set_target_properties Can not find target to add properties to: dmlc"
  - "Cannot specify link libraries for target \"dmlc\" which is not built by this project."
  - "-- Configuring incomplete, errors occurred!"

- Failing command/step:
  [builder 5/7] RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release

- Missing packages or files mentioned:
  - The source dir /workspace/dmlc-core is missing a CMakeLists.txt file:
    The source directory /workspace/dmlc-core does not contain a CMakeLists.txt file.
  - This leads to the dmlc target not being built, causing subsequent target_link_libraries errors.

- Version mismatch info:
  - xgboost VERSION: 3.3.0 (as reported during the CMake/config step)
  - The build environment uses Ubuntu jammy (jammy-20260210.1) as base image, with OpenMP and GCC toolchain pulled in during apt-get steps.
WRITEWriteFile· step #4
0s
Dockerfile1392 bytes written
text55 lines · 1392 chars
# Multi-stage build for XGBoost from source on Ubuntu jammy

FROM ubuntu:jammy-20260210.1 as builder

# Install build dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        build-essential \
        cmake \
        git \
        ca-certificates \
        pkg-config \
        python3-pip \
        libopenmpi-dev \
        openmpi-bin \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /workspace

# Copy source
COPY . .

# If submodules are present but not populated, attempt to fetch dmlc-core from its standalone repo
RUN if [ -d dmlc-core ]; then \
        if [ ! -f dmlc-core/CMakeLists.txt ]; then \
            rm -rf dmlc-core && git clone --depth 1 https://github.com/dmlc/dmlc-core.git dmlc-core; \
        fi; fi

# Configure and build
RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build -j$(nproc)

# Install the built artifacts to /usr/local
RUN cmake --install build

FROM ubuntu:jammy-20260210.1 as runtime

# Runtime dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        libstdc++6 \
        ca-certificates \
        pkg-config \
    && rm -rf /var/lib/apt/lists/*

# Copy installed artifacts from builder
COPY --from=builder /usr/local /usr/local

# Ensure dynamic linker can find libs
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

WORKDIR /workspace

CMD ["/bin/bash"]
VERIFYVerifyBuild· step #5
2m 10s
VerifyBuildsmoke_failed
Concerns: The submodule fetch logic appears inverted: it only attempts to fetch dmlc-core if the directory exists, which could skip fetching when the directory is missing. Consider flipping the condition to handle missing submodules correctly (e.g., if [ -d dmlc-core ]; then ... fi should be replaced with if [ -d dmlc-core ] || [ ! -f dmlc-core/CMakeLists.txt ]; then ...).
Smoke [FAIL]: test -f /usr/local/include/xgboost/c_api.h && echo 'XGBoost C API header found
  Output: sh: 1: Syntax error: Unterminated quoted string

Smoke [PASS]: test -e /usr/local/lib/libxgboost.so || (ls -1 /usr/local/lib/libxgboost.so* 2>/dev/null | head -n 1 >/dev/null && echo 'XGBoost library found' || exit 1)
Smoke [FAIL]: echo "$LD_LIBRARY_PATH" | grep -q /usr/local/lib && echo 'LD_LIBRARY_PATH contains /usr/local/lib
  Output: sh: 1: Syntax error: Unterminated quoted string
WRITEWriteFile· step #6
1s
Dockerfile1283 bytes written
text53 lines · 1283 chars
# Multi-stage build for XGBoost from source on Ubuntu jammy

FROM ubuntu:jammy-20260210.1 as builder

# Install build dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        build-essential \
        cmake \
        git \
        ca-certificates \
        pkg-config \
        python3-pip \
        libopenmpi-dev \
        openmpi-bin \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /workspace

# Copy source
COPY . .

# Ensure we have dmlc-core (build dependency) - fetch from upstream to ensure CMakeLists.txt exists
RUN rm -rf dmlc-core
RUN git clone --depth 1 https://github.com/dmlc/dmlc-core.git dmlc-core

# Configure and build
RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build -j$(nproc)

# Install the built artifacts to /usr/local
RUN cmake --install build

FROM ubuntu:jammy-20260210.1 as runtime

# Runtime dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        libstdc++6 \
        ca-certificates \
        pkg-config \
    && rm -rf /var/lib/apt/lists/*

# Copy installed artifacts from builder
COPY --from=builder /usr/local /usr/local

# Ensure dynamic linker can find libs
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

WORKDIR /workspace

CMD ["/bin/bash"]
VERIFYVerifyBuild· step #7
1m 53s
VerifyBuildsmoke_failed
Smoke [PASS]: test -f /usr/local/lib/libxgboost.so
Smoke [FAIL]: ldd /usr/local/lib/libxgboost.so | grep -q 'libstdc++.so.6
  Output: sh: 1: Syntax error: Unterminated quoted string
WRITEWriteFile· step #8
0s
Dockerfile1209 bytes written
text52 lines · 1209 chars
# Multi-stage build for XGBoost from source on Ubuntu jammy

FROM ubuntu:jammy-20260210.1 as builder

# Install build dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        build-essential \
        cmake \
        git \
        ca-certificates \
        pkg-config \
        python3-pip \
        libopenmpi-dev \
        openmpi-bin \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /workspace

# Copy source
COPY . .

# Initialize submodules (if present) to fetch dmlc-core and others
RUN git submodule update --init --recursive || true

# Configure and build
RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build -j$(nproc)

# Install the built artifacts to /usr/local
RUN cmake --install build

FROM ubuntu:jammy-20260210.1 as runtime

# Runtime dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        libstdc++6 \
        ca-certificates \
        pkg-config \
    && rm -rf /var/lib/apt/lists/*

# Copy installed artifacts from builder
COPY --from=builder /usr/local /usr/local

# Ensure dynamic linker can find libs
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

WORKDIR /workspace

CMD ["/bin/bash"]
VERIFYVerifyBuild· step #9
54s
VerifyBuildbuild_failed
Build error
Failing step
- Builder 6/8: RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- Exit code: 1

Exact error messages (from cmake step)
- CMake Error at CMakeLists.txt:297 (add_subdirectory):
  The source directory /workspace/dmlc-core does not contain a CMakeLists.txt file.
- CMake Error at cmake/Utils.cmake:185 (set_target_properties):
  set_target_properties Can not find target to add properties to: dmlc
- CMake Error at cmake/Utils.cmake:271 (target_link_libraries):
  Cannot specify link libraries for target "dmlc" which is not built by this project.
- -- Configuring incomplete, errors occurred!
- See also "/workspace/build/CMakeFiles/CMakeOutput.log".

Missing files/packages mentioned
- The source directory /workspace/dmlc-core does not contain a CMakeLists.txt file.

Other relevant preconditions (from log)
- fatal: not a git repository (or any of the parent directories): .git (from previous git submodule update attempt)

Version/environment details observed
- CMake version: 3.22.1
- C/C++ compiler: GNU 11.4.0
- OpenMP: found (4.5)
- xgboost VERSION: 3.3.0

Notes
- The git submodule step attempted earlier failed with a fatal git error, but was allowed to continue (|| true). The primary build failure is the missing CMakeLists.txt under /workspace/dmlc-core, causing the target dmlc to be unresolved.
WRITEWriteFile· step #10
1s
Dockerfile1399 bytes written
text57 lines · 1399 chars
# Multi-stage build for XGBoost from source on Ubuntu jammy

FROM ubuntu:jammy-20260210.1 as builder

# Install build dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        build-essential \
        cmake \
        git \
        ca-certificates \
        pkg-config \
        python3-pip \
        libopenmpi-dev \
        openmpi-bin \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /workspace

# Copy source
COPY . .

# Ensure dmlc-core is available with a CMakeLists.txt (fallback to upstream if missing)
RUN if [ -d dmlc-core ]; then \
        if [ ! -f dmlc-core/CMakeLists.txt ]; then \
            rm -rf dmlc-core; \
            git clone --depth 1 https://github.com/dmlc/dmlc-core.git dmlc-core; \
        fi; \
    fi

# Configure and build
RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build -j$(nproc)

# Install the built artifacts to /usr/local
RUN cmake --install build

FROM ubuntu:jammy-20260210.1 as runtime

# Runtime dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        libstdc++6 \
        ca-certificates \
        pkg-config \
    && rm -rf /var/lib/apt/lists/*

# Copy installed artifacts from builder
COPY --from=builder /usr/local /usr/local

# Ensure dynamic linker can find libs
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

WORKDIR /workspace

CMD ["/bin/bash"]
VERIFYVerifyBuild· step #11
2m 46s
VerifyBuildsmoke_failed
Concerns: Potential runtime dependency gaps: the runtime image only installs libstdc++6, ca-certificates, and pkg-config. If the built libxgboost.so has additional runtime dependencies (e.g., MPI libraries or other shared libs), they may be missing at runtime., DMLC-core handling in builder: the script only clones dmlc-core if the directory exists and has a CMakeLists.txt, otherwise it does nothing. If the repository expects dmlc-core to be present but it isn’t, the build could fail. Consider auto-cloning or validating presence more robustly.
Smoke [PASS]: test -f /usr/local/include/xgboost/c_api.h
Smoke [PASS]: test -f /usr/local/lib/libxgboost.so
Smoke [FAIL]: ldd /usr/local/lib/libxgboost.so | grep -q 'not found' && echo 'missing' || echo 'ok
  Output: sh: 1: Syntax error: Unterminated quoted string
WRITEWriteFile· step #12
1s
Dockerfile1213 bytes written
text52 lines · 1213 chars
# Multi-stage build for XGBoost from source on Ubuntu jammy

FROM ubuntu:jammy-20260210.1 as builder

# Install build dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        build-essential \
        cmake \
        git \
        ca-certificates \
        pkg-config \
        python3-pip \
        libopenmpi-dev \
        openmpi-bin \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /workspace

# Copy source
COPY . .

# Configure and build (prefer system DMLC if available to avoid missing submodules)
RUN cmake -S . -B build \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_WITH_SYSTEM_DMLC=ON \
    -DUSE_OPENMP=ON
RUN cmake --build build -j$(nproc)

# Install the built artifacts to /usr/local
RUN cmake --install build

FROM ubuntu:jammy-20260210.1 as runtime

# Runtime dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        libstdc++6 \
        ca-certificates \
        pkg-config \
    && rm -rf /var/lib/apt/lists/*

# Copy installed artifacts from builder
COPY --from=builder /usr/local /usr/local

# Ensure dynamic linker can find libs
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

WORKDIR /workspace

CMD ["/bin/bash"]
VERIFYVerifyBuild· step #13
1m 07s
VerifyBuildbuild_failed
Build error
Failing step:
- [builder 5/7] RUN cmake -S . -B build     -DCMAKE_BUILD_TYPE=Release     -DBUILD_WITH_SYSTEM_DMLC=ON     -DUSE_OPENMP=ON

Exact error message and exit code:
- Exit code: 1
- CMake output:
  CMake Error at CMakeLists.txt:294 (find_package):
    By not providing "Finddmlc.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "dmlc", but
    CMake did not find one.

  Could not find a package configuration file provided by "dmlc" with any of
  the following names:

    dmlcConfig.cmake
    dmlc-config.cmake

  Add the installation prefix of "dmlc" to CMAKE_PREFIX_PATH or set
  "dmlc_DIR" to a directory containing one of the above files.  If "dmlc"
  provides a separate development package or SDK, be sure it has been
  installed.

  Configuring incomplete, errors occurred!
  See also "/workspace/build/CMakeFiles/CMakeOutput.log".

Missing packages or files mentioned:
- Package not found: dmlc
- Missing configuration files: dmlcConfig.cmake or dmlc-config.cmake
- Missing module finder: Finddmlc.cmake in CMAKE_MODULE_PATH

Version and environment details (relevant context):
- CMake version: 3.22.1
- C/C++ compiler: GNU 11.4.0
- xgboost version: 3.3.0

Warnings (unique, not repeated):
- Warning: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 3; repeated later at line 33)
- Warning: UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' (line 47)
WRITEWriteFile· step #14
1s
Dockerfile1508 bytes written
text60 lines · 1508 chars
# Multi-stage build for XGBoost from source on Ubuntu jammy

FROM ubuntu:jammy-20260210.1 as builder

# Install build dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        build-essential \
        cmake \
        git \
        ca-certificates \
        pkg-config \
        python3-pip \
        libopenmpi-dev \
        openmpi-bin \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /workspace

# Copy source
COPY . .

# Ensure dmlc-core is available with a CMakeLists.txt (fallback to upstream if missing)
RUN if [ -d dmlc-core ]; then \
        if [ ! -f dmlc-core/CMakeLists.txt ]; then \
            rm -rf dmlc-core; \
            git clone --depth 1 https://github.com/dmlc/dmlc-core.git dmlc-core; \
        fi; \
    else \
        git clone --depth 1 https://github.com/dmlc/dmlc-core.git dmlc-core; \
    fi

# Configure and build
RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
RUN cmake --build build -j$(nproc)

# Install the built artifacts to /usr/local
RUN cmake --install build

FROM ubuntu:jammy-20260210.1 as runtime

# Runtime dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        libstdc++6 \
        libgomp1 \
        ca-certificates \
        pkg-config \
    && rm -rf /var/lib/apt/lists/*

# Copy installed artifacts from builder
COPY --from=builder /usr/local /usr/local

# Ensure dynamic linker can find libs
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

WORKDIR /workspace

CMD ["/bin/bash"]
VERIFYVerifyBuild· step #15
1m 52s
VerifyBuildaccepted
Concerns: Smoke tests only verify the presence of the library file; they do not verify functional runtime behavior or correctness of the compiled library., No tests verify header installation or API availability beyond file presence; consider adding a quick compile/link test or a small runnable snippet if feasible., The image relies on LD_LIBRARY_PATH for runtime library discovery; ensure downstream environments don't override or unset this variable.
Smoke [PASS]: test -f /usr/local/lib/libxgboost.so
Smoke [PASS]: ldd /usr/local/lib/libxgboost.so | head -n 5
Smoke [PASS]: test -f /usr/local/include/xgboost/c_api.h