Skip to content

Commit

Permalink
fix: uv installation in container
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming committed Feb 10, 2025
1 parent c94f281 commit 3fa3d82
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ WORKDIR $BENTO_PATH
# Block SETUP_BENTO_COMPONENTS
{% block SETUP_BENTO_COMPONENTS %}

RUN uv venv -p {{ __options__python_version }} /app/.venv
RUN pip install uv && UV_PYTHON_INSTALL_DIR=/app/python/ uv venv {% if __options__python_version %}-p {{ __options__python_version }}{% endif %} /app/.venv
ENV VIRTUAL_ENV=/app/.venv

{% set __pip_cache__ = common.mount_cache("/root/.cache/uv") %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

ENV ENV /root/.bashrc

RUN curl -LO https://astral.sh/uv/install.sh && \
sh install.sh && rm install.sh && mv $HOME/.local/bin/uv /usr/local/bin/

{% if __options__system_packages is not none %}
# Install user-defined system package
{% call common.RUN(__enable_buildkit__) -%} {{ common.mount_cache("/var/cache/apk") }} {% endcall -%} set -eux \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ USER root
amazon-linux-extras enable python{{ __options__python_version }} && \
yum install -y python{{ __options__python_version.split(".") | join('') }} python{{ __options__python_version.split(".") | join('') }}-devel && \
yum groupinstall -y "Development Tools"

RUN curl -LO https://astral.sh/uv/install.sh && \
sh install.sh && rm install.sh && mv $HOME/.local/bin/uv /usr/local/bin/
{% 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 @@ -11,7 +11,4 @@ RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloa
apt-get update -y && \
apt-get install -q -y --no-install-recommends --allow-remove-essential \
ca-certificates gnupg2 bash build-essential curl {% if __options__system_packages is not none %}{{ __options__system_packages | join(' ') }}{% endif %}

RUN curl -LO https://astral.sh/uv/install.sh && \
sh install.sh && rm install.sh && mv $HOME/.local/bin/uv /usr/local/bin/
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ USER root
{% call common.RUN(__enable_buildkit__) -%} {{ common.mount_cache("/var/cache/yum") }} {% endcall -%} set -eux && \
yum upgrade -y \
&& yum install -y ca-certificates curl gcc gcc-c++ make bash shadow-utils

RUN curl -LO https://astral.sh/uv/install.sh && \
sh install.sh && rm install.sh && mv $HOME/.local/bin/uv /usr/local/bin/
{% 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

0 comments on commit 3fa3d82

Please sign in to comment.