diff --git a/install_python_deps.sh b/install_python_deps.sh new file mode 100755 index 0000000..95864e4 --- /dev/null +++ b/install_python_deps.sh @@ -0,0 +1,41 @@ +#!/bin/bash +set -e + +PACKAGES=( + async-timeout + attrs + Deprecated + iniconfig + packaging + pluggy + py + pyparsing + pytest + redis + tomli + wrapt + pytest-asyncio + pytest-repeat + pytest-emoji + pytest-icdiff + pytest-timeout + pymemcache + meta_memcache + prometheus_client + aiohttp + numpy + pytest-json-report + psutil + boto3 + asyncio + hiredis + PyYAML + testcontainers + valkey +) + +# Try installing without --break-system-packages first +if ! pip install "${PACKAGES[@]}" 2>/dev/null; then + echo "Standard pip install failed, retrying with --break-system-packages..." + pip install --break-system-packages "${PACKAGES[@]}" +fi diff --git a/u20.04-dev.Dockerfile b/u20.04-dev.Dockerfile index 6987711..b1180dd 100644 --- a/u20.04-dev.Dockerfile +++ b/u20.04-dev.Dockerfile @@ -6,6 +6,7 @@ LABEL org.opencontainers.image.source="https://github.com/romange/container-foun COPY ./get_mold.sh /tmp/ COPY ./get_openssl.sh /tmp/ COPY ./install_versioned_redis.sh /tmp/ +COPY ./install_python_deps.sh /tmp/ # To avoid tzdata reconfigure ENV DEBIAN_FRONTEND=noninteractive @@ -25,7 +26,7 @@ RUN /tmp/install_versioned_redis.sh redis-server redis-server-6.2.11 https://git RUN /tmp/install_versioned_redis.sh redis-server redis-server-7.2.2 https://github.com/redis/redis/archive/7.2.2.tar.gz RUN /tmp/install_versioned_redis.sh valkey-server valkey-server-8.0.1 https://github.com/valkey-io/valkey/archive/refs/tags/8.0.1.tar.gz -RUN /tmp/get_openssl.sh +RUN /tmp/get_openssl.sh && /tmp/install_python_deps.sh # Set OpenSSL path for CMake ENV CMAKE_PREFIX_PATH=/usr/local/ssl