Skip to content

Commit b3b886b

Browse files
authored
feat: Add OpenAI-Compatible Server to NGC Container (#7895)
1 parent 73de967 commit b3b886b

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

build.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,6 +1216,8 @@ def create_dockerfile_linux(
12161216
find /opt/tritonserver/python -maxdepth 1 -type f -name \\
12171217
"tritonfrontend-*.whl" | xargs -I {} pip install --upgrade {}[all]
12181218
1219+
RUN pip3 install -r python/openai/requirements.txt
1220+
12191221
"""
12201222
if not FLAGS.no_core_build:
12211223
# Add feature labels for SageMaker endpoint
@@ -1918,6 +1920,10 @@ def core_build(
19181920
os.path.join(install_dir, "include", "triton", "core"),
19191921
)
19201922

1923+
cmake_script.cpdir(
1924+
os.path.join(repo_dir, "python", "openai"), os.path.join(install_dir, "python")
1925+
)
1926+
19211927
cmake_script.cp(os.path.join(repo_dir, "LICENSE"), install_dir)
19221928
cmake_script.cp(os.path.join(repo_dir, "TRITON_VERSION"), install_dir)
19231929

qa/L0_openai/test.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@
2929

3030
function install_deps() {
3131
# Install python bindings for tritonserver and tritonfrontend
32-
pip install /opt/tritonserver/python/triton*.whl
32+
# pip install /opt/tritonserver/python/triton*.whl
3333

3434
# Install application/testing requirements
3535
pushd openai/
36-
pip install -r requirements.txt
36+
# NOTE: Should be pre-installed in container, but can uncomment if needed
37+
# pip install -r requirements.txt
3738
pip install -r requirements-test.txt
3839

3940
if [ "${IMAGE_KIND}" == "TRTLLM" ]; then
@@ -49,13 +50,17 @@ function prepare_vllm() {
4950
}
5051

5152
function prepare_tensorrtllm() {
53+
# FIXME: Remove when testing TRT-LLM containers built from source
54+
pip install -r requirements.txt
55+
5256
MODEL="llama-3-8b-instruct"
5357
MODEL_REPO="tests/tensorrtllm_models"
5458
rm -rf ${MODEL_REPO}
5559

56-
# FIXME: This will require an upgrade each release to match the TRT-LLM version
60+
# FIXME: This may require an upgrade each release to match the TRT-LLM version,
61+
# and would likely be easier to use trtllm-build directly for test purposes.
5762
# Use Triton CLI to prepare model repository for testing
58-
pip install git+https://github.com/triton-inference-server/triton_cli.git@0.0.10
63+
pip install git+https://github.com/triton-inference-server/triton_cli.git@0.1.1
5964
# NOTE: Could use ENGINE_DEST_PATH set to NFS mount for pre-built engines in future
6065
triton import \
6166
--model ${MODEL} \

0 commit comments

Comments
 (0)