diff --git a/CHANGES.md b/CHANGES.md index 430697d..791b256 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -16,6 +16,8 @@ - Fix uniqueness constraint with `mlflow.server.auth.db.models.SqlUser.username`. +- Fix OCI build re. `psutil` package + ## 2023-11-01 v2.7.1 - Fix uniqueness constraint with `SqlRegisteredModel.name`. Thanks, @andnig. - Downgrade to Python 3.10. A few packages like PyCaret are not ready for diff --git a/pyproject.toml b/pyproject.toml index 43e4c9e..798bb84 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,7 +102,7 @@ release = [ "twine<5", ] test = [ - "psutil<6", + "psutil==5.9.2", # This version has binary wheels for Python 3.10. "pytest<8", "pytest-cov<5", ] diff --git a/release/oci-runtime/Dockerfile b/release/oci-runtime/Dockerfile index e935ee1..3e62844 100644 --- a/release/oci-runtime/Dockerfile +++ b/release/oci-runtime/Dockerfile @@ -18,7 +18,7 @@ RUN \ --mount=type=cache,id=apt,sharing=locked,target=/var/lib/apt \ true \ && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests --yes git openjdk-11-jre + && apt-get install --no-install-recommends --no-install-suggests --yes gcc git openjdk-11-jre python3-dev # Copy sources COPY . /src diff --git a/release/oci-server/Dockerfile b/release/oci-server/Dockerfile index be073e7..ef218fb 100644 --- a/release/oci-server/Dockerfile +++ b/release/oci-server/Dockerfile @@ -13,12 +13,17 @@ ENV TERM linux RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache # Install distribution packages, with caching. +# NB: installing gcc is required in order to build a wheel file +# for psutil, which is a dependency of mlflow. +# The binaries for psutil do not support Python 3.10, requiring +# a build from source. psutil has a large amount of cython within +# its code base, necessitating gcc being present in the image. RUN \ --mount=type=cache,id=apt,sharing=locked,target=/var/cache/apt \ --mount=type=cache,id=apt,sharing=locked,target=/var/lib/apt \ true \ && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests --yes git + && apt-get install --no-install-recommends --no-install-suggests --yes gcc git python3-dev # Copy sources COPY . /src