From 204d2d8a2f2b9e627e306b7c531d0e1485d8f6ad Mon Sep 17 00:00:00 2001 From: Raphael Glon Date: Mon, 8 Apr 2024 16:48:22 +0200 Subject: [PATCH] docker image: text-generation-launcher wrapper as entrypoint run ldconfig before launching tgi Signed-off-by: Raphael Glon --- Dockerfile | 4 +++- tgi-entrypoint.sh | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 tgi-entrypoint.sh diff --git a/Dockerfile b/Dockerfile index e79372a3..b49162fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -250,5 +250,7 @@ ENTRYPOINT ["./entrypoint.sh"] # Final image FROM base -ENTRYPOINT ["text-generation-launcher"] +COPY ./tgi-entrypoint.sh /tgi-entrypoint.sh + +ENTRYPOINT ["/tgi-entrypoint.sh"] CMD ["--json-output"] diff --git a/tgi-entrypoint.sh b/tgi-entrypoint.sh new file mode 100755 index 00000000..ea94dcd9 --- /dev/null +++ b/tgi-entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +ldconfig 2>/dev/null || echo 'unable to refresh ld cache, not a big deal in most cases' + +text-generation-launcher $@