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 diff --git a/kedro-docker/kedro_docker/template/Dockerfile.simple b/kedro-docker/kedro_docker/template/Dockerfile.simple index bb57e0db3..4e5170d3a 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 --system --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 diff --git a/kedro-docker/kedro_docker/template/Dockerfile.spark b/kedro-docker/kedro_docker/template/Dockerfile.spark index 587926ef0..f0911e8c8 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 --system --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