diff --git a/pyproject.toml b/pyproject.toml index 9ce18b11f..94d6faa55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "truss" -version = "0.9.91" +version = "0.9.92dev100" description = "A seamless bridge from model development to model delivery" license = "MIT" readme = "README.md" diff --git a/truss/templates/base.Dockerfile.jinja b/truss/templates/base.Dockerfile.jinja index d3ac71937..aa29fa4ad 100644 --- a/truss/templates/base.Dockerfile.jinja +++ b/truss/templates/base.Dockerfile.jinja @@ -13,8 +13,10 @@ RUN $PYTHON_EXECUTABLE -c "import sys; \ || { echo "ERROR: Supplied base image does not have {{ min_supported_python_version_in_custom_base_image }} <= python <= {{ max_supported_python_version_in_custom_base_image }}"; exit 1; } {% endblock %} +{%- if not config.docker_server %} RUN pip install --upgrade pip --no-cache-dir \ && rm -rf /root/.cache/pip +{%- endif %} {% block base_image_patch %} {% endblock %} diff --git a/truss/templates/server.Dockerfile.jinja b/truss/templates/server.Dockerfile.jinja index 4768098f8..4863324e2 100644 --- a/truss/templates/server.Dockerfile.jinja +++ b/truss/templates/server.Dockerfile.jinja @@ -60,6 +60,7 @@ RUN mkdir -p {{ dst.parent }}; curl -L "{{ url }}" -o {{ dst }} {% endfor %} {#- endfor external_data_files #} {%- endif %} {#- endif external_data_files #} +USER root {%- if build_commands %} {% for command in build_commands %} RUN {% for secret,path in config.build.secret_to_path_mapping.items() %} --mount=type=secret,id={{ secret }},target={{ path }}{%- endfor %} {{ command }} @@ -134,6 +135,7 @@ RUN mkdir -p {{ supervisor_log_dir }} COPY supervisord.conf {{ supervisor_config_path }} ENV SUPERVISOR_SERVER_URL="{{ supervisor_server_url }}" ENV SERVER_START_CMD="supervisord -c {{ supervisor_config_path }}" + ENTRYPOINT ["supervisord", "-c", "{{ supervisor_config_path }}"] {%- elif config.live_reload %} {#- elif config.live_reload #} ENV HASH_TRUSS="{{ truss_hash }}"