Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: copy uv from official docker image and freeze the version #5102

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#
# ===========================================
{% endif %}
FROM ghcr.io/astral-sh/uv:0.5.4 as uv

# Block SETUP_BENTO_BASE_IMAGE
{% block SETUP_BENTO_BASE_IMAGE %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
ENV ENV /root/.bashrc

ENV UV_SYSTEM_PYTHON=1
RUN curl -LO https://astral.sh/uv/install.sh && \
sh install.sh && rm install.sh && mv $HOME/.local/bin/uv /usr/local/bin/
COPY --from=uv /uv /usr/local/bin/uv
COPY --from=uv /uvx /usr/local/bin/uvx

{% if __options__system_packages is not none %}
# Install user-defined system package
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ USER root
yum groupinstall -y "Development Tools"

ENV UV_SYSTEM_PYTHON=1
RUN curl -LO https://astral.sh/uv/install.sh && \
sh install.sh && rm install.sh && mv $HOME/.local/bin/uv /usr/local/bin/
COPY --from=uv /uv /usr/local/bin/uv
COPY --from=uv /uvx /usr/local/bin/uvx
{% if __options__system_packages is not none %}
# Install user-defined system package
{% call common.RUN(__enable_buildkit__) -%} {{ common.mount_cache("/var/cache/yum") }} {% endcall -%} set -eux && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloa
ca-certificates gnupg2 bash build-essential curl {% if __options__system_packages is not none %}{{ __options__system_packages | join(' ') }}{% endif %}

ENV UV_SYSTEM_PYTHON=1
RUN curl -LO https://astral.sh/uv/install.sh && \
sh install.sh && rm install.sh && mv $HOME/.local/bin/uv /usr/local/bin/
COPY --from=uv /uv /usr/local/bin/uv
COPY --from=uv /uvx /usr/local/bin/uvx
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ USER root
&& yum install -y ca-certificates curl gcc gcc-c++ make bash shadow-utils

ENV UV_SYSTEM_PYTHON=1
RUN curl -LO https://astral.sh/uv/install.sh && \
sh install.sh && rm install.sh && mv $HOME/.local/bin/uv /usr/local/bin/
COPY --from=uv /uv /usr/local/bin/uv
COPY --from=uv /uvx /usr/local/bin/uvx
{% if __options__system_packages is not none %}
# Install user-defined system package
{% call common.RUN(__enable_buildkit__) -%} {{ common.mount_cache("/var/cache/yum") }} {% endcall -%} set -eux && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#
# ===========================================
{% endif %}
FROM ghcr.io/astral-sh/uv:0.5.4 as uv

# Block SETUP_BENTO_BASE_IMAGE
{% block SETUP_BENTO_BASE_IMAGE %}
Expand Down Expand Up @@ -64,9 +65,9 @@ RUN command -v apt-get && apt-get update && apt-get -y install {{ required_packa
{% for command in __options__commands %}
RUN {{ command }}
{% endfor %}

RUN curl -LO https://astral.sh/uv/install.sh && \
sh install.sh && rm install.sh && mv $HOME/.local/bin/uv /usr/local/bin/ && uv venv --python {{ __options__python_version }}
COPY --from=uv /uv /usr/local/bin/uv
COPY --from=uv /uvx /usr/local/bin/uvx
RUN uv venv --python {{ __options__python_version }}
{% set __pip_cache__ = common.mount_cache("/root/.cache/") %}
{% if __pip_preheat_packages__ %}
{% for value in __pip_preheat_packages__ -%}
Expand Down