Commit 7ba4d4eb authored by Carlos Natalino's avatar Carlos Natalino
Browse files

Upgrade PathComp frontend from Python 3.9 to 3.13.

The image now builds on python:3.13-slim with common_requirements_py313.in so grpcio, protobuf, and pytest match Context and Service. numpy/pandas/scikit-learn are bumped to 3.13-capable releases, and the frontend Deployment uses native gRPC probes instead of grpc_health_probe.
parent 6c3e4c4c
Loading
Loading
Loading
Loading
+9 −4
Changes for manifests/pathcompservice.yaml: 9 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -39,12 +39,17 @@ spec:
              value: "INFO"
            - name: ENABLE_FORECASTER
              value: "NO"
          startupProbe:
            grpc:
              port: 10020
            failureThreshold: 30
            periodSeconds: 1
          readinessProbe:
            exec:
              command: ["/bin/grpc_health_probe", "-addr=:10020"]
            grpc:
              port: 10020
          livenessProbe:
            exec:
              command: ["/bin/grpc_health_probe", "-addr=:10020"]
            grpc:
              port: 10020
          resources:
            requests:
              cpu: 250m
+6 −6
Changes for src/pathcomp/frontend/Dockerfile: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM python:3.9-slim
FROM python:3.13-slim

# Install dependencies
RUN apt-get --yes --quiet --quiet update && \
@@ -23,9 +23,9 @@ RUN apt-get --yes --quiet --quiet update && \
ENV PYTHONUNBUFFERED=0

# Download the gRPC health probe
RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \
    wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
    chmod +x /bin/grpc_health_probe
# RUN GRPC_HEALTH_PROBE_VERSION=v0.4.40 && \
#     wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
#     chmod +x /bin/grpc_health_probe

# Get generic Python packages
RUN python3 -m pip install --upgrade 'pip==25.2'
@@ -35,7 +35,7 @@ RUN python3 -m pip install --upgrade 'pip-tools==7.3.0'
# Get common Python packages
# Note: this step enables sharing the previous Docker build steps among all the Python components
WORKDIR /var/teraflow
COPY common_requirements.in common_requirements.in
COPY common_requirements_py313.in common_requirements.in
RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in
RUN python3 -m pip install -r common_requirements.txt

@@ -57,7 +57,7 @@ RUN find . -type f -exec sed -i -E 's/^(import\ .*)_pb2/from . \1_pb2/g' {} \;
RUN mkdir -p /var/teraflow/pathcomp/frontend
WORKDIR /var/teraflow/pathcomp/frontend
COPY src/pathcomp/frontend/requirements.in requirements.in
RUN pip-compile --quiet --output-file=requirements.txt requirements.in
RUN pip-compile --quiet --output-file=requirements.txt requirements.in /var/teraflow/common_requirements.in
RUN python3 -m pip install -r requirements.txt

# Add component files into working directory
+3 −3
Changes for src/pathcomp/frontend/requirements.in: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
# limitations under the License.


numpy<2.0.0
pandas==1.5.*
numpy==2.3.*
pandas==2.3.*
requests==2.27.1
scikit-learn==1.1.*
scikit-learn==1.7.*