File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -115,9 +115,11 @@ WORKDIR $APP_HOME
115115{% endblock %}
116116
117117
118+ {% set packages_dir = "/packages" %}
119+ RUN mkdir -p {{ packages_dir }}
118120{% block bundled_packages_copy %}
119121 {% - if bundled_packages_dir_exists %}
120- COPY --chown={{ default_owner }} ./{{ config.bundled_packages_dir }} /packages
122+ COPY --chown={{ default_owner }} ./{{ config.bundled_packages_dir }} {{ packages_dir }}
121123{% - endif %}
122124{% endblock %}
123125
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ COPY --chown={{ default_owner }} ./{{ config.model_module_dir }} ${APP_HOME}/mod
104104{# Macro to change ownership of directories and switch to regular user #}
105105{% - macro chown_and_switch_to_regular_user_if_enabled (additional_chown_dirs =[]) -%}
106106{% - if non_root_user %}
107- RUN chown -R {{ app_username }}:{{ app_username }} { % for dir in additional_chown_dirs %} {{ dir }} {% endfor %} ${HOME} ${APP_HOME }
107+ RUN chown -R {{ app_username }}:{{ app_username }} ${HOME} ${APP_HOME} {{ packages_dir }} { % for dir in additional_chown_dirs %} {{ dir }} {% endfor %}
108108USER {{ app_username }}
109109{% - endif %} {#- endif non_root_user #}
110110{% - endmacro -%}
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ COPY --chown= ./data ${APP_HOME}/data
3636COPY --chown= ./server ${APP_HOME}
3737COPY --chown= ./config.yaml ${APP_HOME}/config.yaml
3838COPY --chown= ./model ${APP_HOME}/model
39+ RUN mkdir -p /packages
3940COPY --chown= ./packages /packages
4041ENV INFERENCE_SERVER_PORT="8080"
4142ENV SERVER_START_CMD="/usr/local/bin/python3 /app/main.py"
You can’t perform that action at this time.
0 commit comments