From 3d32bef5858dc8d9f1aeb9cb20d19b2b8382bfe5 Mon Sep 17 00:00:00 2001 From: Kevin Wang Date: Mon, 2 Mar 2026 02:34:20 +0000 Subject: [PATCH] fix(ingress): enable unbuffered Python output for real-time logging Python stdout is fully buffered when not connected to a terminal (e.g. in Docker containers). This causes log output to be delayed and appear in batches, making it hard to diagnose timing issues. Set PYTHONUNBUFFERED=1 so print() output appears immediately in container logs. --- custom-domain/dstack-ingress/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/custom-domain/dstack-ingress/Dockerfile b/custom-domain/dstack-ingress/Dockerfile index 9e11a34..95fe693 100644 --- a/custom-domain/dstack-ingress/Dockerfile +++ b/custom-domain/dstack-ingress/Dockerfile @@ -58,6 +58,7 @@ RUN --mount=type=bind,source=scripts,target=/tmp/scripts,ro \ ENV PATH="/scripts:$PATH" ENV PYTHONPATH="/scripts" +ENV PYTHONUNBUFFERED=1 COPY --chmod=666 .GIT_REV /etc/ ENTRYPOINT ["/scripts/entrypoint.sh"]