The CMD is not necessary as it will be overridden by the ENTRYPOINT just like your comment.
If you ssh to your Docker container like `docker run --rm -it --entrypoint=/bin/bash $CUSTOM_CONTAINER_IMAGE`, can you run python and some Beam pipelines with a direct runner in the container? This can help test the environment works fine. I have one old Dockerfile that used to work with the old Beam: https://github.com/google/dataflow-ml-starter/blob/main/tensor_rt.Dockerfile . On Tue, Sep 16, 2025 at 4:56 PM Sai Shashank <shashanksai...@gmail.com> wrote: > > > ---------- Forwarded message --------- > From: Sai Shashank <shashanksai...@gmail.com> > Date: Tue, Sep 16, 2025 at 4:27 PM > Subject: TensorRT inference not starting > To: <u...@beam.apache.org> > > > 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"] > > >