Skip to content

Commit

Permalink
fix(containerize): command to create group and user in alpine base im…
Browse files Browse the repository at this point in the history
…age (#4855)

Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming committed Jul 12, 2024
1 parent 3154de1 commit f40a11f
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ ENV NVIDIA_VISIBLE_DEVICES=
ARG BENTO_USER={{ bento__user }}
ARG BENTO_USER_UID={{ bento__uid_gid }}
ARG BENTO_USER_GID={{ bento__uid_gid }}
RUN groupadd -g $BENTO_USER_GID -o $BENTO_USER && useradd -m -u $BENTO_USER_UID -g $BENTO_USER_GID -o -r $BENTO_USER
{% endblock %}
{% block SETUP_BENTO_ENVARS %}
{% if __options__env is not none %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ RUN curl -LO https://astral.sh/uv/install.sh && \
apk add --update {{ __options__system_packages | join(' ') }}
{% endif -%}
{% endblock %}

{% block SETUP_BENTO_USER %}
{{ super() }}
RUN addgroup -g $BENTO_USER_GID -S $BENTO_USER && adduser -u $BENTO_USER_UID -G $BENTO_USER -S $BENTO_USER
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ RUN curl -LO https://astral.sh/uv/install.sh && \
RUN ln -sf /usr/bin/python{{ __options__python_version }} /usr/bin/python3 && \
ln -sf /usr/bin/pip{{ __options__python_version }} /usr/bin/pip3
{% endblock %}

{% block SETUP_BENTO_USER %}
{{ super() }}
RUN groupadd -g $BENTO_USER_GID -o $BENTO_USER && useradd -m -u $BENTO_USER_UID -g $BENTO_USER_GID -o -r $BENTO_USER
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ ENV UV_SYSTEM_PYTHON=1
RUN curl -LO https://astral.sh/uv/install.sh && \
sh install.sh && rm install.sh && mv $HOME/.cargo/bin/uv /usr/local/bin/
{% endblock %}

{% block SETUP_BENTO_USER %}
{{ super() }}
RUN groupadd -g $BENTO_USER_GID -o $BENTO_USER && useradd -m -u $BENTO_USER_UID -g $BENTO_USER_GID -o -r $BENTO_USER
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ RUN curl -LO https://astral.sh/uv/install.sh && \
yum install -y {{ __options__system_packages | join(' ') }}
{% endif -%}
{% endblock %}

{% block SETUP_BENTO_USER %}
{{ super() }}
RUN groupadd -g $BENTO_USER_GID -o $BENTO_USER && useradd -m -u $BENTO_USER_UID -g $BENTO_USER_GID -o -r $BENTO_USER
{% endblock %}

0 comments on commit f40a11f

Please sign in to comment.