Dev/mask ldconfig output v2 (#1716)

wrap text-generation-launcher in docker image
mask ldconfig failures to user (no need in most cases anyway)

---------

Signed-off-by: Raphael Glon <oOraph@users.noreply.github.com>
Co-authored-by: Raphael Glon <oOraph@users.noreply.github.com>
This commit is contained in:
oOraph 2024-04-11 19:31:48 +02:00 committed by Karol Damaszke
parent c4ee0a653d
commit 194fcb4a3d
3 changed files with 8 additions and 11 deletions

View File

@ -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"]

View File

@ -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();

5
tgi-entrypoint.sh Executable file
View File

@ -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 $@