|
80 | 80 | "py310_23.1.0-1", # Conda version
|
81 | 81 | "9.1.0.1", # TRT version for building TRT-LLM backend
|
82 | 82 | "12.2", # CUDA version for building TRT-LLM backend
|
| 83 | + "0.2.0", # vLLM version |
83 | 84 | )
|
84 | 85 | }
|
85 | 86 |
|
@@ -1332,6 +1333,16 @@ def dockerfile_prepare_container_linux(argmap, backends, enable_gpu, target_mach
|
1332 | 1333 | argmap["TRT_LLM_TRT_VERSION"], argmap["TRT_LLM_CUDA_VERSION"]
|
1333 | 1334 | )
|
1334 | 1335 |
|
| 1336 | + if "vllm" in backends: |
| 1337 | + # [DLIS-5606] Build Conda environment for vLLM backend |
| 1338 | + # Remove Pip install once vLLM backend moves to Conda environment. |
| 1339 | + df += """ |
| 1340 | +# vLLM needed for vLLM backend |
| 1341 | +RUN pip3 install vllm=={} |
| 1342 | +""".format( |
| 1343 | + TRITON_VERSION_MAP[FLAGS.version][9] |
| 1344 | + ) |
| 1345 | + |
1335 | 1346 | df += """
|
1336 | 1347 | WORKDIR /opt/tritonserver
|
1337 | 1348 | RUN rm -fr /opt/tritonserver/*
|
@@ -1839,6 +1850,39 @@ def backend_build(
|
1839 | 1850 | cmake_script.blankln()
|
1840 | 1851 |
|
1841 | 1852 |
|
| 1853 | +def backend_clone( |
| 1854 | + be, |
| 1855 | + clone_script, |
| 1856 | + tag, |
| 1857 | + build_dir, |
| 1858 | + install_dir, |
| 1859 | + github_organization, |
| 1860 | +): |
| 1861 | + clone_script.commentln(8) |
| 1862 | + clone_script.comment(f"'{be}' backend") |
| 1863 | + clone_script.comment("Delete this section to remove backend from build") |
| 1864 | + clone_script.comment() |
| 1865 | + clone_script.mkdir(build_dir) |
| 1866 | + clone_script.cwd(build_dir) |
| 1867 | + clone_script.gitclone(backend_repo(be), tag, be, github_organization) |
| 1868 | + |
| 1869 | + repo_target_dir = os.path.join(install_dir, "backends") |
| 1870 | + clone_script.mkdir(repo_target_dir) |
| 1871 | + backend_dir = os.path.join(repo_target_dir, be) |
| 1872 | + clone_script.rmdir(backend_dir) |
| 1873 | + clone_script.mkdir(backend_dir) |
| 1874 | + |
| 1875 | + clone_script.cp( |
| 1876 | + os.path.join(build_dir, be, "src", "model.py"), |
| 1877 | + backend_dir, |
| 1878 | + ) |
| 1879 | + |
| 1880 | + clone_script.comment() |
| 1881 | + clone_script.comment(f"end '{be}' backend") |
| 1882 | + clone_script.commentln(8) |
| 1883 | + clone_script.blankln() |
| 1884 | + |
| 1885 | + |
1842 | 1886 | def repo_agent_build(
|
1843 | 1887 | ra, cmake_script, build_dir, install_dir, repoagent_repo, repoagents
|
1844 | 1888 | ):
|
@@ -2504,6 +2548,15 @@ def enable_all():
|
2504 | 2548 | log('backend "{}" at tag/branch "{}"'.format(parts[0], parts[1]))
|
2505 | 2549 | backends[parts[0]] = parts[1]
|
2506 | 2550 |
|
| 2551 | + if "vllm" in backends: |
| 2552 | + if "python" not in backends: |
| 2553 | + log( |
| 2554 | + "vLLM backend requires Python backend, adding Python backend with tag {}".format( |
| 2555 | + backends["vllm"] |
| 2556 | + ) |
| 2557 | + ) |
| 2558 | + backends["python"] = backends["vllm"] |
| 2559 | + |
2507 | 2560 | # Initialize map of repo agents to build and repo-tag for each.
|
2508 | 2561 | repoagents = {}
|
2509 | 2562 | for be in FLAGS.repoagent:
|
@@ -2691,17 +2744,27 @@ def enable_all():
|
2691 | 2744 | else:
|
2692 | 2745 | github_organization = FLAGS.github_organization
|
2693 | 2746 |
|
2694 |
| - backend_build( |
2695 |
| - be, |
2696 |
| - cmake_script, |
2697 |
| - backends[be], |
2698 |
| - script_build_dir, |
2699 |
| - script_install_dir, |
2700 |
| - github_organization, |
2701 |
| - images, |
2702 |
| - components, |
2703 |
| - library_paths, |
2704 |
| - ) |
| 2747 | + if be == "vllm": |
| 2748 | + backend_clone( |
| 2749 | + be, |
| 2750 | + cmake_script, |
| 2751 | + backends[be], |
| 2752 | + script_build_dir, |
| 2753 | + script_install_dir, |
| 2754 | + github_organization, |
| 2755 | + ) |
| 2756 | + else: |
| 2757 | + backend_build( |
| 2758 | + be, |
| 2759 | + cmake_script, |
| 2760 | + backends[be], |
| 2761 | + script_build_dir, |
| 2762 | + script_install_dir, |
| 2763 | + github_organization, |
| 2764 | + images, |
| 2765 | + components, |
| 2766 | + library_paths, |
| 2767 | + ) |
2705 | 2768 |
|
2706 | 2769 | # Commands to build each repo agent...
|
2707 | 2770 | for ra in repoagents:
|
|
0 commit comments