build: replace build.py with Conan 2 + CMakePresets build system#8734
Draft
build: replace build.py with Conan 2 + CMakePresets build system#8734
Conversation
Retire the build.py / ExternalProject / third_party workflow. Every
external dependency is now resolved through Conan 2 (private NVIDIA
Artifactory remote or Conan Center). Internal Triton repos (common,
core, backend) are consumed as local add_subdirectory checkouts whose
paths are set by conanfile.py or overridden on the cmake command line.
New files:
- conanfile.py: server dependency manifest (grpc, protobuf, re2, boost,
libevent, libevhtp, prometheus-cpp, gtest, nlohmann_json, …)
- requirements.txt: Python wheel deps (tritonfrontend, tritonserver)
- CMakePresets.json: thin include wrapper (points to cmake/presets/)
- cmake/CMakePresets.json: aggregated include list for all platform files
- cmake/presets/CMakePresets.TritonInferenceServer.*.json (6 presets):
Release targets for CPU/CUDA × Ubuntu/manylinux × x86_64/aarch64
- cmake/presets/CMakePresets.TritonClient.*.json (6 presets): client variants
- cmake/presets/CMakePresets.TritonPerfAnalyzer.*.json (2 presets)
- cmake/presets/CMakePresets.TritonVLLMBackend.*.json (1 preset)
- cmake/presets/CMakePresets.TritonTRTLLMBackend.*.json (2 presets)
- conan/profiles/linux-gcc13-{release,debug,-aarch64,-manylinux,…}: build profiles
- conan/recipes/{libevhtp,cnmem,dcgm}/conanfile.py: custom Conan recipes
- build.py → build.py.legacy: retired (kept for reference)
Modified files:
- CMakeLists.txt: replace ExternalProject/FetchContent with
add_subdirectory for sibling repos; add triton_add_backend /
triton_add_plugin macros; add FetchContent compatibility shims so
existing ${repo-core_SOURCE_DIR} references in test targets still resolve
- src/CMakeLists.txt: replace legacy Find-module variable refs with Conan
imported targets (libevent::*, opentelemetry-cpp::*, AWSSDK::*);
add rapidjson to simple target; fix relative ldscript path → absolute
- src/test/CMakeLists.txt: use libevent::core + libevent::extra instead of
${LIBEVENT_LIBRARIES}; drop ${LIBEVENT_INCLUDE_DIRS} (propagated via
target interface)
- src/test/*/CMakeLists.txt (7 files): fix relative --version-script paths
to ${CMAKE_CURRENT_BINARY_DIR}/... for Ninja compatibility
- .gitignore: exclude CMakeUserPresets.json (generated by conan install)
Developer workflow:
conan install server/ \
--profile:host=server/conan/profiles/linux-gcc13-release \
--profile:build=server/conan/profiles/linux-gcc13-release \
-o '&:enable_gpu=False' --build=missing \
--output-folder=server/build/<preset>/conan
cmake --preset triton-inference-server-release-cpu-ubuntu-x86_64
cmake --build --preset triton-inference-server-release-cpu-ubuntu-x86_64
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Apr 13, 2026
- Set CMAKE_CUDA_RUNTIME_LIBRARY=Shared in server/src and all CUDA preset JSONs so libtritonserver.so links libcudart.so dynamically, matching the production container (libcudart.so.13). - Move all find_package() calls before add_subdirectory(core) in CMakeLists.txt so cnmem::cnmem and DCGM::dcgm imported targets exist when core/src/CMakeLists.txt evaluates if(TARGET cnmem::cnmem). - Update dcgm/conanfile.py to search /usr/include and /usr/lib/x86_64-linux-gnu in addition to /usr/local/dcgm so the apt-installed datacenter-gpu-manager package is found correctly. - Add rapidjson to memory_alloc example link libraries.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
triton-inference-server/backend#123
triton-inference-server/common#154
triton-inference-server/core#490
triton-inference-server/third_party#74
Description
Replaces the legacy
build.pyscript with a Conan 2 package manager and CMakePresets-based build system for the main server repository. Adds Conan recipes for internal dependencies (cnmem, dcgm, libevhtp), build presets for all target platforms/architectures, and migrates CMakeLists.txt to use Conan-provided imported targets.Changes
Affected Files