fix(docker): use protoc v25 for ml_training_service CUDA build

Ubuntu 22.04's protobuf-compiler (v3.12) lacks proto3 optional field
support. Install protoc v25.1 from GitHub releases instead, which
matches the protoc version available in Debian bookworm-based images
used by the other 5 services.

Validated: docker build completes successfully, binary starts with
ml_training_service --help.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-02-23 17:21:27 +01:00
parent d8d51aa2d0
commit 5af8b0b921

View File

@@ -18,12 +18,19 @@ RUN apt-get update && apt-get install -y \
ENV PATH="/root/.cargo/bin:${PATH}"
# Install build dependencies including CUDA toolkit
# Note: protobuf-compiler from Ubuntu 22.04 is v3.12 which lacks proto3 optional support.
# Install protoc v25 from GitHub releases instead.
RUN apt-get update && apt-get install -y \
pkg-config \
libssl-dev \
protobuf-compiler \
nvidia-cuda-toolkit \
&& rm -rf /var/lib/apt/lists/*
unzip \
&& rm -rf /var/lib/apt/lists/* \
&& curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protoc-25.1-linux-x86_64.zip \
-o /tmp/protoc.zip \
&& unzip -q /tmp/protoc.zip -d /usr/local bin/protoc 'include/*' \
&& rm /tmp/protoc.zip \
&& chmod +x /usr/local/bin/protoc
# Set working directory
WORKDIR /build