Skip to content

Commit ee0dd74

Browse files
authored
fix: update installation logic for Python packages in Dockerfile template (#5534)
Signed-off-by: Frost Ming <me@frostming.com>
1 parent ce6146d commit ee0dd74

File tree

1 file changed

+3
-3
lines changed
  • src/bentoml/_internal/container/frontend/dockerfile/templates

1 file changed

+3
-3
lines changed

src/bentoml/_internal/container/frontend/dockerfile/templates/base_v2.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ ENV PATH=/app/.venv/bin:${PATH}
9494

9595
COPY --chown={{ bento__user }}:{{ bento__user }} ./env/python ./env/python/
9696
# install python packages
97-
{% call common.RUN(__enable_buildkit__) -%} {{ __secret_mounts__ }} {{ __pip_cache__ }} {% endcall -%} if [ -d ./env/python/wheels ]; \
98-
then INSTALL_ROOT="./env/python/"; \
99-
else INSTALL_ROOT="./src"; \
97+
{% call common.RUN(__enable_buildkit__) -%} {{ __secret_mounts__ }} {{ __pip_cache__ }} {% endcall -%} if [ -d ./src ]; \
98+
then INSTALL_ROOT="./src"; \
99+
else INSTALL_ROOT="./env/python"; \
100100
fi; {{ __secret_exports__ }}uv --directory $INSTALL_ROOT pip install -r $BENTO_PATH/env/python/requirements.txt
101101

102102
{% for command in __options__post_commands %}

0 commit comments

Comments
 (0)