Skip to content

Sshanker/proxy buffering #1538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 2 additions & 0 deletions truss/templates/base.Dockerfile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
2 changes: 2 additions & 0 deletions truss/templates/docker_server/proxy.conf.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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 = / {
Expand Down
2 changes: 2 additions & 0 deletions truss/templates/server.Dockerfile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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}}"
Expand Down
Loading