-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add CPU only to compose script #3365
Conversation
…ctured evn variable checking logic
…stream version to use actual upstream version in build.py
build.py
Outdated
@@ -760,6 +761,7 @@ def dockerfile_prepare_container_linux(argmap, backends, enable_gpu): | |||
ENV TF_ADJUST_SATURATION_FUSED 1 | |||
ENV TF_ENABLE_WINOGRAD_NONFUSED 1 | |||
ENV TF_AUTOTUNE_THRESHOLD 2 | |||
ENV TRITON_GPU_ENABLED_BUILD {gpu_enabled} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TRITON_SERVER_GPU_ENABLED
compose.py
Outdated
@@ -150,41 +151,79 @@ def create_argmap(images): | |||
# Extract information from upstream build and create map other functions can | |||
# use | |||
upstreamDockerImage = images["full"] | |||
minDockerImage = images["min"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use lower-case underscores style for variables
"upstreamDockerImage" confuses upstream meaning. Use full_docker_image
compose.py
Outdated
minDockerImage = images["min"] | ||
enable_gpu = FLAGS.enable_gpu | ||
# Docker inspect enviroment variables | ||
baseRunArgs = ['docker', 'inspect', '-f'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable naming style
docs/compose.md
Outdated
@@ -54,7 +63,44 @@ will provide a container `tritonserver` locally. You can access the container wi | |||
$ docker run -it tritonserver:latest | |||
``` | |||
|
|||
Note: If `compose.py` is run on release versions `r21.08` and older, the resulting container will have DCGM version 2.2.3 installed. This may result in different GPU statistic reporting behavior. | |||
Note: If `compose.py` is run on release versions `r21.08` and older, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"and earlier"
docs/compose.md
Outdated
### Compose a specific version of Triton | ||
|
||
`compose.py` requires two containers to build, a `min` container which is the | ||
base the compose container is build from and a `full` container where the script |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build -> built
compose.py
Outdated
gpu_enabled = False if e == None else True | ||
fail_if( | ||
not gpu_enabled, | ||
'\'enable-gpu\' flag added but min container provided does not have CUDA installed' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of added say specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address changes here and in other places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
were you looking at a old version? I think I addressed all your comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was. Looks like you address all the changes
compose.py
Outdated
"nvcr.io/nvidia/tritonserver:{}-cpu-only-py3".format( | ||
FLAGS.container_version), | ||
"min": | ||
"ubuntu:20.04".format(FLAGS.container_version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you adding .format(FLAGS.container_version)
?
docs/compose.md
Outdated
`compose.py` provides `--backend`, `--repoagent` options that allow you to specify which backends and repository agents to include in the custom image. The `--enable-gpu` flag indicates that you want to create an image that supports NVIDIA GPUs. For example, the following creates a new docker image that contains only the TensorFlow 1 and TensorFlow 2 backends and the checksum repository agent. | ||
The `compose.py` script can be found in the [server repository](https://github.com/triton-inference-server/server). | ||
Simply clone the repository and run `compose.py` to create a custom container. | ||
Note created container version will depend on the branch that was cloned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: or Note that the
docs/compose.md
Outdated
`compose.py` provides `--backend`, `--repoagent` options that allow you to | ||
specify which backends and repository agents to include in the custom image. | ||
The `--enable-gpu` flag indicates that you want to create an image that supports | ||
NVIDIA GPUs. For example, the following creates a new docker image that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space at start
docs/compose.md
Outdated
### Compose a specific version of Triton | ||
|
||
`compose.py` requires two containers to build, a `min` container which is the | ||
base the compose container is build from and a `full` container where the script |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from which the script will extract components.
docs/compose.md
Outdated
python3 compose.py --backend tensorflow1 --repoagent checksum --enable-gpu | ||
``` | ||
on branch [r21.08](https://github.com/triton-inference-server/server/tree/r21.08) pulls: | ||
- `min` container `nvcr.io/nvidia/tritonserver:21.08-py3-min` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space at start
docs/compose.md
Outdated
|
||
### CPU only container composition | ||
|
||
To compose a container that is build for only cpu usage, simply remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
built
docs/compose.md
Outdated
|
||
To compose a container that is build for only cpu usage, simply remove the | ||
`--enable-gpu` flag when running `compose.py`. | ||
This will build a container from `ubuntu:20.04` docker and use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using ubuntu:20.04 as base
docs/compose.md
Outdated
This will build a container from `ubuntu:20.04` docker and use | ||
backends/repoagents from `nvcr.io/nvidia/tritonserver:<upstream-container-version>-cpu-only-py3`. | ||
Note: | ||
1. If composing a CPU only container, both `min` and `full` containers should be built for CPU only and not have CUDA installed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When composing
48d5990
to
2921195
Compare
2921195
to
8b6a9e5
Compare
compose.py
Outdated
gpu_enabled = False if e == None else True | ||
fail_if( | ||
not gpu_enabled, | ||
'\'enable-gpu\' flag added but min container provided does not have CUDA installed' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address changes here and in other places
Enable compose script to compose cpu-only containers. Fixed upstream-version confusion to ensure compose script works for all branches