From 932b021eb38e115add546717b414d68e37a0a3b3 Mon Sep 17 00:00:00 2001 From: totallynotmanas Date: Fri, 1 May 2026 18:16:52 +0400 Subject: [PATCH] updated requirements with specific versions --- Dockerfile | 19 ++++++++++--------- build_image.sh | 15 +++++++++++---- requirements.txt | 4 ++-- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 34154ee..58e8574 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,21 @@ FROM python:3.11-slim -# Sample dockerfile to generate image for testing container mgr +# Use a minimal base image and install dependencies needed for Python package builds. +ENV PIP_NO_CACHE_DIR=1 -RUN apt-get -y update && apt-get -y upgrade - -RUN pip install grpcio grpcio_tools +RUN apt-get update \ + && apt-get upgrade -y \ + && apt-get install -y --no-install-recommends ca-certificates \ + && rm -rf /var/lib/apt/lists/* WORKDIR /home -COPY ./volpe_py ./volpe_py - COPY requirements.txt . +RUN python -m pip install --upgrade pip setuptools wheel \ + && python -m pip install --prefer-binary -r requirements.txt -RUN pip install -r requirements.txt - +COPY ./volpe_py ./volpe_py COPY . . -CMD [ "/usr/local/bin/python3", "./main.py" ] +CMD ["python", "./main.py"] diff --git a/build_image.sh b/build_image.sh index 5644148..914733f 100644 --- a/build_image.sh +++ b/build_image.sh @@ -1,5 +1,12 @@ -DOCKER_CMD="${DOCKER_CMD:-podman}" +#!/usr/bin/env bash +set -euo pipefail -rm volpe_img.tar -$DOCKER_CMD build -t volpe_grpc_test . -$DOCKER_CMD save -o volpe_img.tar volpe_grpc_test +DOCKER_CMD="${DOCKER_CMD:-$(command -v podman || command -v docker || true)}" +if [ -z "$DOCKER_CMD" ]; then + echo "Error: podman or docker command is required." + exit 1 +fi + +rm -f volpe_img.tar +"$DOCKER_CMD" build -t volpe_grpc_test . +"$DOCKER_CMD" save -o volpe_img.tar volpe_grpc_test diff --git a/requirements.txt b/requirements.txt index cb54a5d..079de1e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ numpy opfunu -grpcio-tools -protobuf +grpcio-tools>=1.78.1 +protobuf>=6.31.0 setuptools<81 deap