From 87f259cd36b0116c83bf5301d4cbf6ff56c2890a Mon Sep 17 00:00:00 2001 From: Minura Punchihewa Date: Thu, 7 Nov 2024 22:23:59 +0530 Subject: [PATCH 1/4] updated Dockerfile to use uv for dep management Signed-off-by: Minura Punchihewa --- kedro-docker/kedro_docker/template/Dockerfile.simple | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kedro-docker/kedro_docker/template/Dockerfile.simple b/kedro-docker/kedro_docker/template/Dockerfile.simple index bb57e0db3..1d48872b6 100644 --- a/kedro-docker/kedro_docker/template/Dockerfile.simple +++ b/kedro-docker/kedro_docker/template/Dockerfile.simple @@ -1,16 +1,19 @@ ARG BASE_IMAGE=python:3.9-slim FROM $BASE_IMAGE as runtime-environment +# update pip and install uv +RUN python -m pip install -U "pip>=21.2" +RUN pip install uv + # install project requirements COPY requirements.txt /tmp/requirements.txt -RUN python -m pip install -U "pip>=21.2" -RUN pip install --no-cache-dir -r /tmp/requirements.txt && rm -f /tmp/requirements.txt +RUN uv pip install --no-cache-dir -r /tmp/requirements.txt && rm -f /tmp/requirements.txt # add kedro user ARG KEDRO_UID=999 ARG KEDRO_GID=0 RUN groupadd -f -g ${KEDRO_GID} kedro_group && \ -useradd -m -d /home/kedro_docker -s /bin/bash -g ${KEDRO_GID} -u ${KEDRO_UID} kedro_docker + useradd -m -d /home/kedro_docker -s /bin/bash -g ${KEDRO_GID} -u ${KEDRO_UID} kedro_docker WORKDIR /home/kedro_docker USER kedro_docker From bf5d2f34ac1c87bdc96fce27bb594bea9571b7d3 Mon Sep 17 00:00:00 2001 From: Minura Punchihewa Date: Thu, 7 Nov 2024 22:25:57 +0530 Subject: [PATCH 2/4] updated Spark Dockerfile to use uv for dep management Signed-off-by: Minura Punchihewa --- kedro-docker/kedro_docker/template/Dockerfile.spark | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/kedro-docker/kedro_docker/template/Dockerfile.spark b/kedro-docker/kedro_docker/template/Dockerfile.spark index 587926ef0..f14fa61ee 100644 --- a/kedro-docker/kedro_docker/template/Dockerfile.spark +++ b/kedro-docker/kedro_docker/template/Dockerfile.spark @@ -3,18 +3,21 @@ FROM $BASE_IMAGE as runtime-environment # install JVM RUN apt-get update && mkdir -p /usr/share/man/man1 && \ -apt-get install -y procps default-jre-headless && rm -rf /var/lib/apt/lists/* + apt-get install -y procps default-jre-headless && rm -rf /var/lib/apt/lists/* + +# update pip and install uv +RUN python -m pip install -U "pip>=21.2" +RUN pip install uv # install project requirements COPY requirements.txt /tmp/requirements.txt -RUN python -m pip install -U "pip>=21.2" -RUN pip install --no-cache-dir -r /tmp/requirements.txt && rm -f /tmp/requirements.txt +RUN uv pip install --no-cache-dir -r /tmp/requirements.txt && rm -f /tmp/requirements.txt # add kedro user ARG KEDRO_UID=999 ARG KEDRO_GID=0 RUN groupadd -f -g ${KEDRO_GID} kedro_group && \ -useradd -m -d /home/kedro_docker -s /bin/bash -g ${KEDRO_GID} -u ${KEDRO_UID} kedro_docker + useradd -m -d /home/kedro_docker -s /bin/bash -g ${KEDRO_GID} -u ${KEDRO_UID} kedro_docker WORKDIR /home/kedro_docker USER kedro_docker From b4003bf014011677db41780edacccfde1be0fedf Mon Sep 17 00:00:00 2001 From: Minura Punchihewa Date: Thu, 7 Nov 2024 23:46:02 +0530 Subject: [PATCH 3/4] added the --system flag to allow installation across the system Signed-off-by: Minura Punchihewa --- kedro-docker/kedro_docker/template/Dockerfile.simple | 2 +- kedro-docker/kedro_docker/template/Dockerfile.spark | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kedro-docker/kedro_docker/template/Dockerfile.simple b/kedro-docker/kedro_docker/template/Dockerfile.simple index 1d48872b6..4e5170d3a 100644 --- a/kedro-docker/kedro_docker/template/Dockerfile.simple +++ b/kedro-docker/kedro_docker/template/Dockerfile.simple @@ -7,7 +7,7 @@ RUN pip install uv # install project requirements COPY requirements.txt /tmp/requirements.txt -RUN uv pip install --no-cache-dir -r /tmp/requirements.txt && rm -f /tmp/requirements.txt +RUN uv pip install --system --no-cache-dir -r /tmp/requirements.txt && rm -f /tmp/requirements.txt # add kedro user ARG KEDRO_UID=999 diff --git a/kedro-docker/kedro_docker/template/Dockerfile.spark b/kedro-docker/kedro_docker/template/Dockerfile.spark index f14fa61ee..f0911e8c8 100644 --- a/kedro-docker/kedro_docker/template/Dockerfile.spark +++ b/kedro-docker/kedro_docker/template/Dockerfile.spark @@ -11,7 +11,7 @@ RUN pip install uv # install project requirements COPY requirements.txt /tmp/requirements.txt -RUN uv pip install --no-cache-dir -r /tmp/requirements.txt && rm -f /tmp/requirements.txt +RUN uv pip install --system --no-cache-dir -r /tmp/requirements.txt && rm -f /tmp/requirements.txt # add kedro user ARG KEDRO_UID=999 From a2445e5f22ff4c3764bcca02df2092684c7b1da2 Mon Sep 17 00:00:00 2001 From: Minura Punchihewa Date: Tue, 12 Nov 2024 20:40:42 +0530 Subject: [PATCH 4/4] updated the release doc Signed-off-by: Minura Punchihewa --- kedro-docker/RELEASE.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kedro-docker/RELEASE.md b/kedro-docker/RELEASE.md index 0d1045270..147efd465 100644 --- a/kedro-docker/RELEASE.md +++ b/kedro-docker/RELEASE.md @@ -1,4 +1,8 @@ # Upcoming Release +* Switch dependency management to `uv`. + +## Thanks for supporting contributions +[Minura Punchihewa](https://github.com/MinuraPunchihewa) # Release 0.7.0 ## Major features and improvements