Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove entrypoint from inference/training images. #336

Merged
merged 1 commit into from
May 26, 2022

Conversation

oliverholworthy
Copy link
Member

Removing the entrypoint specified will mean the entrypoint will inherit from the triton image.

Motivation

The current entrypoint has some issues. It doesn't allow arguments to be passed through to the
script. So no matter what commands you pass to docker run, it will always only execute /bin/bash.

The entrypoint can be changed when using docker, so this issue can be worked around by specifying the entrypoint as ["/opt/nvidia/nvidia_entrypoint.sh"].

Example

This command will not run the tritonserver. The arguments passed are ignored and you get a bash shell.

docker run -it --rm nvcr.io/nvidia/merlin/merlin-tensorflow-inference:22.05 tritonserver

Entrypoint changes

Before:

["/bin/bash", "-c", "/opt/nvidia/nvidia_entrypoint.sh"]

After:

["/opt/nvidia/nvidia_entrypoint.sh"]

Testing

Checked this by building one of the images:

cd docker/inference

# build image
docker build -t "merlin-inference-tf" - < dockerfile.tf

# check that we can run tritonserver for example
docker run --rm "merlin-inference-tf" tritonserver

Removing the entrypoint specified will mean the entrypoint will inherit from the triton image.

The current entrypoint has some issues. It doesn't allow arguments to be passed through to the
script.
So no matter what commands you pass to docker run, it will always only execute /bin/bash.

_Example_:

This command will not run the tritonserver. The arguments passed are ignored and you get a bash shell.

```sh
docker run -it --rm nvcr.io/nvidia/merlin/merlin-tensorflow-inference:22.05 tritonserver
```

Before:

```
["/bin/bash", "-c", "/opt/nvidia/nvidia_entrypoint.sh"]
```

After:

```
["/opt/nvidia/nvidia_entrypoint.sh"]
```
@oliverholworthy oliverholworthy added the bug Something isn't working label May 25, 2022
@github-actions
Copy link

Documentation preview

https://nvidia-merlin.github.io/Merlin/review/pr-336

@nvidia-merlin-bot
Copy link
Contributor

Click to view CI Results
GitHub pull request #336 of commit b4f6215f9c4d8b68953466d9c7c81db1522af4cb, no merge conflicts.
Running as SYSTEM
Setting status of b4f6215f9c4d8b68953466d9c7c81db1522af4cb to PENDING with url https://10.20.13.93:8080/job/merlin_merlin/106/console and message: 'Pending'
Using context: Jenkins
Building on master in workspace /var/jenkins_home/workspace/merlin_merlin
using credential systems-login
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/NVIDIA-Merlin/Merlin # timeout=10
Fetching upstream changes from https://github.com/NVIDIA-Merlin/Merlin
 > git --version # timeout=10
using GIT_ASKPASS to set credentials login for merlin-systems
 > git fetch --tags --force --progress -- https://github.com/NVIDIA-Merlin/Merlin +refs/pull/336/*:refs/remotes/origin/pr/336/* # timeout=10
 > git rev-parse b4f6215f9c4d8b68953466d9c7c81db1522af4cb^{commit} # timeout=10
Checking out Revision b4f6215f9c4d8b68953466d9c7c81db1522af4cb (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f b4f6215f9c4d8b68953466d9c7c81db1522af4cb # timeout=10
Commit message: "Remove entrypoint from inference/training images."
 > git rev-list --no-walk 2a13bce18fb6b358e2082bed50267a945b9e7946 # timeout=10
[merlin_merlin] $ /bin/bash /tmp/jenkins1663017499129546792.sh
============================= test session starts ==============================
platform linux -- Python 3.8.10, pytest-7.1.2, pluggy-1.0.0
rootdir: /var/jenkins_home/workspace/merlin_merlin/merlin
plugins: anyio-3.5.0, xdist-2.5.0, forked-1.4.0, cov-3.0.0
collected 1 item

tests/unit/test_version.py . [100%]

============================== 1 passed in 0.01s ===============================
Performing Post build task...
Match found for : : True
Logical operation result is TRUE
Running script : #!/bin/bash
cd /var/jenkins_home/
CUDA_VISIBLE_DEVICES=1 python test_res_push.py "https://api.GitHub.com/repos/NVIDIA-Merlin/Merlin/issues/$ghprbPullId/comments" "/var/jenkins_home/jobs/$JOB_NAME/builds/$BUILD_NUMBER/log"
[merlin_merlin] $ /bin/bash /tmp/jenkins3983985451249429606.sh

@benfred
Copy link
Member

benfred commented May 25, 2022

@jperez999 can you take a look at this? I know we added this for cuda forward compat purposes, but I'm also wondering if we can inherit from the base container

@benfred benfred requested a review from jperez999 May 25, 2022 23:54
@jperez999 jperez999 merged commit 50b9267 into NVIDIA-Merlin:main May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants