diff --git a/configs/environment-cohorts/schema.json b/configs/environment-cohorts/schema.json deleted file mode 100644 index 650b5c5e83..0000000000 --- a/configs/environment-cohorts/schema.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/NVIDIA/TensorRT-Model-Connect/schemas/environment-cohort-v1.json", - "title": "TRTMC environment cohort", - "type": "object", - "additionalProperties": false, - "required": [ - "schema_version", - "id", - "status", - "targets", - "tensorrt", - "cuda", - "python_versions", - "architectures", - "managed_local" - ], - "properties": { - "schema_version": {"const": 1}, - "id": {"type": "string", "pattern": "^[a-z][a-z0-9-]+$"}, - "status": {"enum": ["supported", "experimental"]}, - "targets": { - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": {"enum": ["local", "docker"]} - }, - "tensorrt": { - "type": "object", - "additionalProperties": false, - "required": ["version", "apt_version"], - "properties": { - "version": {"type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$"}, - "apt_version": {"type": "string", "minLength": 1} - } - }, - "cuda": { - "type": "object", - "additionalProperties": false, - "required": ["version"], - "properties": { - "version": {"type": "string", "pattern": "^[0-9]+\\.[0-9]+$"} - } - }, - "python_versions": { - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": {"type": "string", "pattern": "^[0-9]+\\.[0-9]+$"} - }, - "managed_local": { - "type": "object", - "additionalProperties": false, - "required": ["python_packages"], - "properties": { - "python_packages": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "additionalProperties": false, - "required": ["name", "version"], - "properties": { - "name": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]*$"}, - "version": {"type": "string", "minLength": 1} - } - } - } - } - }, - "architectures": { - "type": "object", - "minProperties": 1, - "propertyNames": {"enum": ["x86_64", "aarch64"]}, - "additionalProperties": { - "type": "object", - "additionalProperties": false, - "required": [ - "dockerfile", - "docker_context", - "container_python_version", - "wheel_platform", - "tensorrt_include_dir", - "tensorrt_library_dir", - "tensorrt_headers" - ], - "properties": { - "dockerfile": {"type": "string", "minLength": 1}, - "docker_context": {"type": "string", "minLength": 1}, - "container_python_version": {"type": "string", "pattern": "^[0-9]+\\.[0-9]+$"}, - "wheel_platform": {"type": "string", "pattern": "^manylinux_2_[0-9]+_(x86_64|aarch64)$"}, - "tensorrt_include_dir": {"type": "string", "pattern": "^/"}, - "tensorrt_library_dir": {"type": "string", "pattern": "^/"}, - "tensorrt_headers": { - "type": "object", - "additionalProperties": false, - "required": ["url", "sha256"], - "properties": { - "url": {"type": "string", "pattern": "^https://"}, - "sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"} - } - } - } - } - } - } -} diff --git a/configs/environment-cohorts/trt111-cu133.json b/configs/environment-cohorts/trt111-cu133.json deleted file mode 100644 index 7766886b2b..0000000000 --- a/configs/environment-cohorts/trt111-cu133.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "schema_version": 1, - "id": "trt111-cu133", - "status": "supported", - "targets": ["local", "docker"], - "tensorrt": { - "version": "11.1.0.106", - "apt_version": "11.1.0.106-1+cuda13.3" - }, - "cuda": { - "version": "13.3" - }, - "python_versions": [ - "3.10", - "3.12" - ], - "managed_local": { - "python_packages": [ - {"name": "cmake", "version": "4.3.0"}, - {"name": "ninja", "version": "1.13.2"}, - {"name": "patchelf", "version": "0.19.1.0"}, - {"name": "setuptools", "version": "81.0.0"}, - {"name": "apache-tvm-ffi", "version": "0.1.12"}, - {"name": "cuda-python", "version": "13.0.3"}, - {"name": "numpy", "version": "2.4.4"}, - {"name": "transformers", "version": "5.2.0"}, - {"name": "nvidia-cuda-nvcc", "version": "13.3.73"}, - {"name": "nvidia-cuda-runtime", "version": "13.3.29"}, - {"name": "nvidia-cuda-crt", "version": "13.3.73"}, - {"name": "nvidia-cuda-cccl", "version": "13.3.3.4.1"}, - {"name": "nvidia-cuda-nvrtc", "version": "13.3.33"}, - {"name": "nvidia-nvjitlink", "version": "13.3.33"}, - {"name": "nvidia-cublas", "version": "13.6.1.10"}, - {"name": "nvidia-curand", "version": "10.4.3.29"}, - {"name": "tensorrt", "version": "11.1.0.106"} - ] - }, - "architectures": { - "x86_64": { - "dockerfile": "Dockerfile.dev.x86", - "docker_context": "requirements", - "container_python_version": "3.12", - "wheel_platform": "manylinux_2_39_x86_64", - "tensorrt_include_dir": "/usr/include/x86_64-linux-gnu", - "tensorrt_library_dir": "/usr/lib/x86_64-linux-gnu", - "tensorrt_headers": { - "url": "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/libnvinfer-headers-dev_11.1.0.106-1+cuda13.3_amd64.deb", - "sha256": "af7870ee878dc9afb5ed4236654bcb2663e133dca78432cfcafad74b36a1e88a" - } - }, - "aarch64": { - "dockerfile": "Dockerfile.dev.aarch64", - "docker_context": "requirements", - "container_python_version": "3.12", - "wheel_platform": "manylinux_2_39_aarch64", - "tensorrt_include_dir": "/usr/include/aarch64-linux-gnu", - "tensorrt_library_dir": "/usr/lib/aarch64-linux-gnu", - "tensorrt_headers": { - "url": "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/sbsa/libnvinfer-headers-dev_11.1.0.106-1+cuda13.3_arm64.deb", - "sha256": "b0304cf0e5e4f7596562706a9826a80f76b0d0c95b49406a52a9e9a398546254" - } - } - } -} diff --git a/configs/environment-cohorts/trt112-cu133.json b/configs/environment-cohorts/trt112-cu133.json deleted file mode 100644 index dfd5d166e7..0000000000 --- a/configs/environment-cohorts/trt112-cu133.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "schema_version": 1, - "id": "trt112-cu133", - "status": "supported", - "targets": ["local"], - "tensorrt": { - "version": "11.2.1.2", - "apt_version": "11.2.1.2-1+cuda13.3" - }, - "cuda": { - "version": "13.3" - }, - "python_versions": [ - "3.10", - "3.12" - ], - "managed_local": { - "python_packages": [ - {"name": "cmake", "version": "4.3.0"}, - {"name": "ninja", "version": "1.13.2"}, - {"name": "patchelf", "version": "0.19.1.0"}, - {"name": "setuptools", "version": "81.0.0"}, - {"name": "apache-tvm-ffi", "version": "0.1.12"}, - {"name": "cuda-python", "version": "13.0.3"}, - {"name": "numpy", "version": "2.4.4"}, - {"name": "transformers", "version": "5.2.0"}, - {"name": "nvidia-cuda-nvcc", "version": "13.3.73"}, - {"name": "nvidia-cuda-runtime", "version": "13.3.29"}, - {"name": "nvidia-cuda-crt", "version": "13.3.73"}, - {"name": "nvidia-cuda-cccl", "version": "13.3.3.4.1"}, - {"name": "nvidia-cuda-nvrtc", "version": "13.3.33"}, - {"name": "nvidia-nvjitlink", "version": "13.3.33"}, - {"name": "nvidia-cublas", "version": "13.6.1.10"}, - {"name": "nvidia-curand", "version": "10.4.3.29"}, - {"name": "tensorrt", "version": "11.2.1.2"} - ] - }, - "architectures": { - "x86_64": { - "dockerfile": "Dockerfile.dev.x86", - "docker_context": "requirements", - "container_python_version": "3.12", - "wheel_platform": "manylinux_2_39_x86_64", - "tensorrt_include_dir": "/usr/include/x86_64-linux-gnu", - "tensorrt_library_dir": "/usr/lib/x86_64-linux-gnu", - "tensorrt_headers": { - "url": "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/libnvinfer-headers-dev_11.2.1.2-1+cuda13.3_amd64.deb", - "sha256": "419b21ac4cdb18b4ddf65b72e5e816fccab9db789730aa96cf228da982104e29" - } - }, - "aarch64": { - "dockerfile": "Dockerfile.dev.aarch64", - "docker_context": "requirements", - "container_python_version": "3.12", - "wheel_platform": "manylinux_2_39_aarch64", - "tensorrt_include_dir": "/usr/include/aarch64-linux-gnu", - "tensorrt_library_dir": "/usr/lib/aarch64-linux-gnu", - "tensorrt_headers": { - "url": "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/sbsa/libnvinfer-headers-dev_11.2.1.2-1+cuda13.3_arm64.deb", - "sha256": "2937bbf91b0d75bf07699e1004bc124ed63355f5700dbedd4dcada7752376cd2" - } - } - } -} diff --git a/scripts/devToolkit/README.md b/scripts/devToolkit/README.md index 0ebad5dcef..ab800295fb 100644 --- a/scripts/devToolkit/README.md +++ b/scripts/devToolkit/README.md @@ -14,7 +14,7 @@ ProvisionedEnvironment + CommandSpec -> run() -> CommandResult ``` Attestation and receipts are automatic postconditions of these operations. -There is no cohort admission check in this path. +There is no version allowlist or preset admission check in this path. Execution-resource lifecycle is an independent, optional capability. It feeds a ready target into the same environment API instead of introducing a workflow: @@ -217,7 +217,7 @@ isolated virtual environment without an OS-package install. Versions unavailable from the public indexes, such as an internal or pre-release build, can be supplied through a team JSON catalog. This is still automatic -installation—the manifest is discovery metadata, not a cohort allowlist: +installation—the manifest is discovery metadata, not a version allowlist: ```python from trtmc_devtoolkit import DevToolkit, JsonToolchainCatalog, builtin_provider_registry @@ -277,9 +277,9 @@ version. Use `CudaPolicy.exact("12.8")`, `CudaPolicy.system_only()`, or ## Qualification is explicit and source-neutral -DevToolkit does not scan `configs/environment-cohorts/` by default. A caller may -attach optional qualification evidence through a source adapter; this never -controls which TensorRT version can be attempted. +DevToolkit has no built-in qualification dataset and loads no qualification +records by default. A caller may attach optional qualification evidence through +a source adapter; this never controls which TensorRT version can be attempted. ```python from trtmc_devtoolkit import JsonQualificationSource @@ -293,17 +293,17 @@ toolkit = DevToolkit.from_checkout( request = EnvironmentRequest( tensorrt="11.2.1.2", target=ExecutionTarget.local(), - preset="trt112-cu133", + preset="team-qualified-trt112", require_qualification=True, ) ``` -A JSON qualification record declares generic facts rather than the historical -cohort shape: +A JSON qualification record declares generic, source-neutral facts rather than +a repository-specific environment bundle: ```json { - "id": "trt112-cu133", + "id": "team-qualified-trt112", "status": "qualified", "requirements": { "tensorrt": "11.2.1.2", @@ -377,4 +377,4 @@ DevToolkit exposes independent target lifecycle through `targets`, plus environment capabilities `resolve()`, `provision()`, `build()`, `run()`, and `run_trtmc()`. Higher-level development flows belong in user code or examples composed from those capabilities; DevToolkit does not define a workflow DAG or -a cohort-gated preparation API. +gate environment preparation on qualification presets. diff --git a/tests/tools/test_github_actions_ci.py b/tests/tools/test_github_actions_ci.py index 2288b56b55..1fe8faaafb 100644 --- a/tests/tools/test_github_actions_ci.py +++ b/tests/tools/test_github_actions_ci.py @@ -1259,6 +1259,8 @@ def test_source_ci_image_uses_common_and_parameterized_tensorrt_overlay() -> Non ) assert "Dockerfile.dev.aarch64" in source_build assert "Dockerfile.dev.x86" in source_build + assert "TrtmcBuildRecipe" in source_build + assert "BuildSpec" not in source_build assert "trtmc_model_qwen" in source_build assert "trtmc_model_plugins" not in source_build assert "TRTMC_ENABLE_LIBTORCH_MULTINOMIAL=OFF" in source_build diff --git a/tests/tools/test_test_impact.py b/tests/tools/test_test_impact.py index 780a07dcb9..cd825368d0 100644 --- a/tests/tools/test_test_impact.py +++ b/tests/tools/test_test_impact.py @@ -1572,8 +1572,6 @@ def test_source_dockerfiles_trigger_tools_tier(self, imap, path): @pytest.mark.parametrize( "path", [ - "configs/environment-cohorts/schema.json", - "configs/environment-cohorts/trt111-cu133.json", "scripts/devToolkit/README.md", "scripts/devToolkit/examples/prepare_environment.py", "scripts/devToolkit/trtmc_devtoolkit/api.py", diff --git a/tools/test_impact.py b/tools/test_impact.py index 2073c9c2aa..dca32e173f 100644 --- a/tools/test_impact.py +++ b/tools/test_impact.py @@ -2063,9 +2063,7 @@ def _classification_rules() -> Tuple[ClassificationRule, ...]: ClassificationRule( priority=491, name="devtoolkit_contract", - matcher=_path_startswith_any( - ("configs/environment-cohorts/", "scripts/devToolkit/") - ), + matcher=_path_startswith("scripts/devToolkit/"), resolver=_match_result( "devtoolkit_contract", _no_models, ["tools"], False ), diff --git a/website/docs/getting-started/source-build.md b/website/docs/getting-started/source-build.md index 71b3e2ac97..4d6ae0e397 100644 --- a/website/docs/getting-started/source-build.md +++ b/website/docs/getting-started/source-build.md @@ -10,7 +10,7 @@ source. Start at the repository root. The repository-local `scripts/devToolkit` Python API exposes independent resolution, provisioning, source-build, and command capabilities. TensorRT is -an arbitrary exact four-part request; a cohort is optional qualification +an arbitrary exact four-part request; qualification evidence is optional provenance, not an allowlist. This example adopts an existing development container and verifies its actual CUDA/TensorRT toolchain before building: @@ -21,7 +21,12 @@ import sys repo = Path.cwd() sys.path.insert(0, str(repo / "scripts" / "devToolkit")) -from trtmc_devtoolkit import BuildSpec, DevToolkit, EnvironmentRequest, ExecutionTarget +from trtmc_devtoolkit import ( + DevToolkit, + EnvironmentRequest, + ExecutionTarget, + TrtmcBuildRecipe, +) toolkit = DevToolkit.from_checkout(repo) lock = toolkit.resolve( @@ -37,7 +42,7 @@ lock = toolkit.resolve( environment = toolkit.provision(lock) build = toolkit.build( environment, - BuildSpec(targets=("trtmc", "trtmc_backend_trt", "trtmc_model_qwen")), + TrtmcBuildRecipe(targets=("trtmc", "trtmc_backend_trt", "trtmc_model_qwen")), ) print(environment.receipt) print(build.receipt) @@ -57,7 +62,7 @@ local targets, explicit CUDA policies, generic TRTMC CLI calls, extension providers, and receipt identity semantics. The manual commands below remain the direct source-build path and show the -operations performed by development mode. +operations represented by the sample recipe. ## 1. Select the GPU and start the container