diff --git a/Dockerfile b/Dockerfile index 64f19570..3eaedfc5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -71,5 +71,7 @@ COPY --from=builder /usr/src/target/release/text-generation-launcher /usr/local/ # 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/launcher/src/main.rs b/launcher/src/main.rs index 0d04c801..309e2cb7 100644 --- a/launcher/src/main.rs +++ b/launcher/src/main.rs @@ -1227,16 +1227,6 @@ fn terminate(process_name: &str, mut process: Child, timeout: Duration) -> io::R } fn main() -> Result<(), LauncherError> { - match Command::new("ldconfig").spawn() { - Ok(_) => {} - Err(err) => { - tracing::warn!( - "Unable to refresh ldconfig cache. Skipping (useless in most cases). Details {:?}", - err - ) - } - } - // Pattern match configuration let args: Args = Args::parse(); 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 $@