Skip to content

Commit b482210

Browse files
UN-2609 [FEAT] Added dumb-init wrapper to forward SIGTERM to Python processes in tool containers (#1466)
* added tool invocation with dumb-init * adding demo folder (to be removed) * adding demo folder to runner/tests * adding demo folder to runner/tests * removing test folder * small change --------- Co-authored-by: vishnuszipstack <[email protected]>
1 parent 5137ef7 commit b482210

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

runner/src/unstract/runner/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ def run_container(
455455
)
456456

457457
container_config = self.client.get_container_run_config(
458-
command=["/bin/sh", "-c", container_command],
458+
command=["dumb-init", "/bin/sh", "-c", container_command],
459459
file_execution_id=file_execution_id,
460460
shared_log_dir=shared_log_dir, # Pass directory for mounting
461461
container_name=container_name,

tools/classifier/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LABEL maintainer="Zipstack Inc."
44

55

66
# Install dependencies for unstructured library's partition
7-
RUN apt-get update && apt-get --no-install-recommends -y install libmagic-dev poppler-utils\
7+
RUN apt-get update && apt-get --no-install-recommends -y install dumb-init libmagic-dev poppler-utils\
88
&& apt-get clean \
99
&& rm -rf /var/lib/apt/lists/*
1010

tools/structure/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ENV \
2222
RUN apt-get update && \
2323
apt-get install -y --no-install-recommends \
2424
ffmpeg libsm6 libxext6 libmagic-dev poppler-utils \
25-
libreoffice freetds-dev freetds-bin && \
25+
libreoffice freetds-dev freetds-bin dumb-init && \
2626
apt-get clean && \
2727
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
2828

tools/text_extractor/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LABEL maintainer="Zipstack Inc."
44

55

66
# Install dependencies for unstructured library's partition
7-
RUN apt-get update && apt-get --no-install-recommends -y install libmagic-dev poppler-utils\
7+
RUN apt-get update && apt-get --no-install-recommends -y install dumb-init libmagic-dev poppler-utils\
88
&& apt-get clean \
99
&& rm -rf /var/lib/apt/lists/*
1010

0 commit comments

Comments
 (0)