Skip to content

Commit f57de7f

Browse files
authored
Update compose.py and remove mention of tensorflow1 in documentation and code (triton-inference-server#7067)
1 parent 3f83727 commit f57de7f

File tree

2 files changed

+39
-18
lines changed

2 files changed

+39
-18
lines changed

compose.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ def start_dockerfile(ddir, images, argmap, dockerfile_name, backends):
7171
argmap["TRITON_VERSION"], argmap["TRITON_CONTAINER_VERSION"], images["full"]
7272
)
7373

74-
# PyTorch, TensorFlow 1 and TensorFlow 2 backends need extra CUDA and other
74+
# PyTorch, TensorFlow backends need extra CUDA and other
7575
# dependencies during runtime that are missing in the CPU-only base container.
7676
# These dependencies must be copied from the Triton Min image.
7777
if not FLAGS.enable_gpu and (
7878
("pytorch" in backends)
79-
or ("tensorflow1" in backends)
79+
or ("tensorflow" in backends)
8080
or ("tensorflow2" in backends)
8181
):
8282
df += """
@@ -506,7 +506,7 @@ def create_argmap(images, skip_pull):
506506
# are not CPU-only.
507507
if (
508508
("pytorch" in FLAGS.backend)
509-
or ("tensorflow1" in FLAGS.backend)
509+
or ("tensorflow" in FLAGS.backend)
510510
or ("tensorflow2" in FLAGS.backend)
511511
) and ("gpu-min" not in images):
512512
images["gpu-min"] = "nvcr.io/nvidia/tritonserver:{}-py3-min".format(

docs/customization_guide/compose.md

+36-15
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,26 @@ from source to get more exact customization.
4141

4242
## Use the compose.py script
4343

44-
The `compose.py` script can be found in the [server repository](https://github.com/triton-inference-server/server).
44+
The `compose.py` script can be found in the
45+
[server repository](https://github.com/triton-inference-server/server).
4546
Simply clone the repository and run `compose.py` to create a custom container.
4647
Note: Created container version will depend on the branch that was cloned.
47-
For example branch [r24.03](https://github.com/triton-inference-server/server/tree/r24.03)
48+
For example branch
49+
[r24.03](https://github.com/triton-inference-server/server/tree/r24.03)
4850
should be used to create a image based on the NGC 24.03 Triton release.
4951

5052
`compose.py` provides `--backend`, `--repoagent` options that allow you to
5153
specify which backends and repository agents to include in the custom image.
5254
For example, the following creates a new docker image that
53-
contains only the TensorFlow 1 and TensorFlow 2 backends and the checksum
55+
contains only the Pytorch and Tensorflow backends and the checksum
5456
repository agent.
5557

5658
Example:
5759
```
58-
python3 compose.py --backend tensorflow1 --backend tensorflow2 --repoagent checksum
60+
python3 compose.py --backend pytorch --backend tensorflow --repoagent checksum
5961
```
60-
will provide a container `tritonserver` locally. You can access the container with
62+
will provide a container `tritonserver` locally. You can access the container
63+
with
6164
```
6265
$ docker run -it tritonserver:latest
6366
```
@@ -74,32 +77,50 @@ script will extract components. The version of the `min` and `full` container
7477
is determined by the branch of Triton `compose.py` is on.
7578
For example, running
7679
```
77-
python3 compose.py --backend tensorflow1 --repoagent checksum
80+
python3 compose.py --backend pytorch --repoagent checksum
7881
```
7982
on branch [r24.03](https://github.com/triton-inference-server/server/tree/r24.03) pulls:
8083
- `min` container `nvcr.io/nvidia/tritonserver:24.03-py3-min`
8184
- `full` container `nvcr.io/nvidia/tritonserver:24.03-py3`
8285

83-
Alternatively, users can specify the version of Triton container to pull from any branch by either:
86+
Alternatively, users can specify the version of Triton container to pull from
87+
any branch by either:
8488
1. Adding flag `--container-version <container version>` to branch
8589
```
86-
python3 compose.py --backend tensorflow1 --repoagent checksum --container-version 24.03
90+
python3 compose.py --backend pytorch --repoagent checksum --container-version 24.03
8791
```
8892
2. Specifying `--image min,<min container image name> --image full,<full container image name>`.
8993
The user is responsible for specifying compatible `min` and `full` containers.
9094
```
91-
python3 compose.py --backend tensorflow1 --repoagent checksum --image min,nvcr.io/nvidia/tritonserver:24.03-py3-min --image full,nvcr.io/nvidia/tritonserver:24.03-py3
95+
python3 compose.py --backend pytorch --repoagent checksum --image min,nvcr.io/nvidia/tritonserver:24.03-py3-min --image full,nvcr.io/nvidia/tritonserver:24.03-py3
9296
```
93-
Method 1 and 2 will result in the same composed container. Furthermore, `--image` flag overrides the `--container-version` flag when both are specified.
97+
Method 1 and 2 will result in the same composed container. Furthermore,
98+
`--image` flag overrides the `--container-version` flag when both are specified.
99+
100+
Note:
101+
1. All contents in `/opt/tritonserver` repository of the `min` image will be
102+
removed to ensure dependencies of the composed image are added properly.
103+
2. vLLM and TensorRT-LLM backends are currently not supported backends for
104+
`compose.py`. If you want to build additional backends on top of these backends,
105+
it would be better to [build it yourself](#build-it-yourself) by using
106+
`nvcr.io/nvidia/tritonserver:24.03-vllm-python-py3` or
107+
`nvcr.io/nvidia/tritonserver:24.03-trtllm-python-py3` as a `min` container.
108+
94109

95110
### CPU-only container composition
96111

97-
CPU-only containers are not yet available for customization. Please see [build documentation](build.md) for instructions to build a full CPU-only container. When including TensorFlow or PyTorch backends in the composed container, an additional `gpu-min` container is needed
98-
since this container provided the CUDA stubs and runtime dependencies which are not provided in the CPU only min container.
112+
CPU-only containers are not yet available for customization. Please see
113+
[build documentation](build.md) for instructions to build a full CPU-only
114+
container. When including TensorFlow or PyTorch backends in the composed
115+
container, an additional `gpu-min` container is needed
116+
since this container provided the CUDA stubs and runtime dependencies which are
117+
not provided in the CPU only min container.
99118

100119
## Build it yourself
101120

102-
If you would like to do what `compose.py` is doing under the hood yourself, you can run `compose.py` with the `--dry-run` option and then modify the `Dockerfile.compose` file to satisfy your needs.
121+
If you would like to do what `compose.py` is doing under the hood yourself, you
122+
can run `compose.py` with the `--dry-run` option and then modify the
123+
`Dockerfile.compose` file to satisfy your needs.
103124

104125

105126
### Triton with Unsupported and Custom Backends
@@ -110,8 +131,8 @@ result of that build should be a directory containing your backend
110131
shared library and any additional files required by the
111132
backend. Assuming your backend is called "mybackend" and that the
112133
directory is "./mybackend", adding the following to the Dockerfile `compose.py`
113-
created will create a Triton image that contains all the supported Triton backends plus your
114-
custom backend.
134+
created will create a Triton image that contains all the supported Triton
135+
backends plus your custom backend.
115136

116137
```
117138
COPY ./mybackend /opt/tritonserver/backends/mybackend

0 commit comments

Comments
 (0)