Skip to content

Conversation

kpedro88
Copy link

The Linux build can fail with the error specified in the PR title if docker create is called without a command.

@whoisj whoisj requested a review from mc-nv October 9, 2025 19:55
COMMAND docker build --cache-from=${TRITON_ONNXRUNTIME_DOCKER_IMAGE} --cache-from=${TRITON_ONNXRUNTIME_DOCKER_IMAGE}_cache0 --cache-from=${TRITON_ONNXRUNTIME_DOCKER_IMAGE}_cache1 -t ${TRITON_ONNXRUNTIME_DOCKER_IMAGE} -f ./Dockerfile.ort ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND docker rm onnxruntime_backend_ort || echo 'error ignored...' || true
COMMAND docker create --name onnxruntime_backend_ort ${TRITON_ONNXRUNTIME_DOCKER_IMAGE}
COMMAND docker create --name onnxruntime_backend_ort ${TRITON_ONNXRUNTIME_DOCKER_IMAGE} /bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no issue with skipping entry command, we don't need it docker cp command.
Container is used in rest, I mean there is no further usage to that container except retrieving libraries that has been compiled during it's image build.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mc-nv can you clarify if this comment is in favor of the proposed change?

To be clear from my side, when I run the command:

docker create --name onnxruntime_backend_ort ${TRITON_ONNXRUNTIME_DOCKER_IMAGE}

I receive the error message:

Error response from daemon: no command specified

Adding /bin/bash to the end prevents this error and the build proceeds without further errors.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current container created without purpose to be executed, only to use docker cp command.
And it's pretty much the same as:

$ docker create --name onnxruntime_backend_ort  ubuntu:24.04
9b2b0d5d5ad5745e3a4d38723cfa4a44e5a5fee6e2ab720ab215b80f7a61f361
$ docker create --name onnxruntime_backend_ort2  python:3.12
09fb5d935ce02a99e018056129ab739db62c59ceb31e22d64e30b33785ff034c

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the container is only created in order to use docker cp. Given that the container is first built two commands earlier, the docker create command is necessary to use docker cp on it.

The commands you wrote using standard containers do work. However, the same command does not work with this container. Probably this could be fixed by modifying the Dockerfile to add an appropriate entry point. But the change proposed here is easier to implement and test.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use ENTRYPOINT may be not suitable, as it designed to make container behave as executable which is not in this case.

If you need to access the ONNX Runtime data after the build you can use the TRITON_ONNXRUNTIME_DOCKER_IMAGE reference in your setup.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it seems that my solution to resolve this error is preferable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants