diff --git a/pyproject.toml b/pyproject.toml index ef7900de9..7057496e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "truss" -version = "0.9.79rc002" +version = "0.9.79rc100" 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 627396673..bff27f65c 100644 --- a/truss/templates/base.Dockerfile.jinja +++ b/truss/templates/base.Dockerfile.jinja @@ -9,8 +9,10 @@ RUN $PYTHON_EXECUTABLE -c "import sys; sys.exit(0) if sys.version_info.major == || { 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/docker_server/proxy.conf.jinja b/truss/templates/docker_server/proxy.conf.jinja index cb210635b..0fc392dfc 100644 --- a/truss/templates/docker_server/proxy.conf.jinja +++ b/truss/templates/docker_server/proxy.conf.jinja @@ -2,6 +2,8 @@ server { # We use the proxy_read_timeout directive here (instead of proxy_send_timeout) as it sets the timeout for reading a response from the proxied server vs. setting a timeout for sending a request to the proxied server. listen 8080; client_max_body_size {{client_max_body_size}}; + proxy_buffering off; + proxy_set_header Connection ""; # Liveness endpoint override location = / { diff --git a/truss/templates/server.Dockerfile.jinja b/truss/templates/server.Dockerfile.jinja index 2efb11ee4..adc9e8ca0 100644 --- a/truss/templates/server.Dockerfile.jinja +++ b/truss/templates/server.Dockerfile.jinja @@ -65,6 +65,7 @@ RUN mkdir -p {{ dst.parent }}; curl -L "{{ url }}" -o {{ dst }} {%- endif %} +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 }} @@ -122,6 +123,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 %} ENV HASH_TRUSS="{{truss_hash}}"