Skip to content

Commit

Permalink
Fix OCI build re. psutil package
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Nov 6, 2023
1 parent 9ce28e4 commit b8d5da9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
Expand Down
2 changes: 1 addition & 1 deletion release/oci-runtime/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion release/oci-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b8d5da9

Please sign in to comment.