---------- Forwarded message ---------
From: Sai Shashank <[email protected]>
Date: Tue, Sep 16, 2025 at 4:27 PM
Subject: TensorRT inference not starting
To: <[email protected]>
Hey Everyone,
I was trying to use tensorRT within the apache
beam on dataflow but somehow , dataflow didn't start like it did not even
give me Worker logs. Below is the docker file that , use to create a
custom image, at first I thought it is the version mismatched but usually
it gives me a harness error .
ARG BUILD_IMAGE=nvcr.io/nvidia/tensorrt:25.08-py3
FROM ${BUILD_IMAGE}
ENV PATH="/usr/src/tensorrt/bin:${PATH}"
WORKDIR /workspace
RUN apt-get update -y && apt-get install -y python3-venv
RUN pip install --no-cache-dir apache-beam[gcp]==2.67.0
COPY --from=apache/beam_python3.10_sdk:2.67.0 /opt/apache/beam
/opt/apache/beam
# Install additional dependencies
RUN pip install --upgrade pip \
&& pip install torch \
&& pip install torchvision \
&& pip install pillow>=8.0.0 \
&& pip install transformers>=4.18.0 \
&& pip install cuda-python \
&& pip install opencv-python==4.7.0.72 \
&& pip install PyMuPDF==1.22.5 \
&& pip install requests==2.31.0
# Set the default command to run the inference script
# This will be overridden by the Apache Beam boot script
CMD ["python", "/workspace/inference.py"]
# Use the Apache Beam boot script as the entrypoint
ENTRYPOINT ["/opt/apache/beam/boot"]