Skip to content

Commit

Permalink
Use uv in all docker images (#3137)
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
  • Loading branch information
eapolinario and eapolinario authored Feb 27, 2025
1 parent a117bcd commit 78cb65e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
3 changes: 2 additions & 1 deletion plugins/flytekit-flyteinteractive/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ RUN apt-get update \
&& tar -xzf /tmp/code-server/code-server-4.19.0-linux-${TARGETARCH}.tar.gz -C /tmp/code-server/ \
&& wget --no-check-certificate https://open-vsx.org/api/ms-python/python/2023.20.0/file/ms-python.python-2023.20.0.vsix -P /tmp/code-server \
&& wget --no-check-certificate https://open-vsx.org/api/ms-toolsai/jupyter/2023.9.100/file/ms-toolsai.jupyter-2023.9.100.vsix -P /tmp/code-server \
&& pip install --no-cache-dir -U flytekitplugins-flyteinteractive==$VERSION flytekit==$VERSION \
&& pip install --no-cache-dir uv \
&& uv pip install --system --no-cache-dir -U flytekitplugins-flyteinteractive==$VERSION flytekit==$VERSION \
&& apt-get clean autoclean \
&& apt-get autoremove --yes \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/ \
Expand Down
5 changes: 3 additions & 2 deletions plugins/flytekit-openai/Dockerfile.batch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION
ARG PYTHON_VERSION=3.12
FROM python:${PYTHON_VERSION}-slim-bookworm

WORKDIR /root
Expand All @@ -8,7 +8,8 @@ ENV PYTHONPATH /root

ARG VERSION

RUN pip install flytekitplugins-openai==$VERSION \
RUN pip install uv --no-cache-dir \
&& uv pip install --system --no-cache-dir -U flytekitplugins-openai==$VERSION \
flytekit==$VERSION

RUN useradd -u 1000 flytekit
Expand Down
4 changes: 3 additions & 1 deletion plugins/flytekit-spark/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ RUN ln -s /usr/bin/python3 /usr/bin/python
RUN apt-get update && apt-get install -y wget

ARG VERSION
RUN pip install --no-cache-dir flytekitplugins-spark==$VERSION flytekit==$VERSION

RUN pip install uv --no-cache-dir \
&& uv pip install --system --no-cache-dir -U flytekitplugins-spark==$VERSION flytekit==$VERSION

RUN wget https://repo1.maven.org/maven2/org/apache/hadoop/hadoop-aws/3.2.2/hadoop-aws-3.2.2.jar -P /opt/spark/jars && \
wget https://repo1.maven.org/maven2/com/amazonaws/aws-java-sdk-bundle/1.12.262/aws-java-sdk-bundle-1.12.262.jar -P /opt/spark/jars
Expand Down
14 changes: 8 additions & 6 deletions plugins/flytekit-sqlalchemy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION
ARG PYTHON_VERSION=3.12
FROM python:${PYTHON_VERSION}-slim-bookworm

WORKDIR /root
Expand All @@ -8,11 +8,13 @@ ENV PYTHONPATH /root

ARG VERSION

RUN pip install sqlalchemy \
psycopg2-binary \
pymysql \
flytekitplugins-sqlalchemy==$VERSION \
flytekit==$VERSION
RUN pip install uv --no-cache-dir \
&& uv pip install --system --no-cache-dir -U \
sqlalchemy \
psycopg2-binary \
pymysql \
flytekitplugins-sqlalchemy==$VERSION \
flytekit==$VERSION

RUN useradd -u 1000 flytekit
RUN chown flytekit: /root
Expand Down

0 comments on commit 78cb65e

Please sign in to comment.