diff --git a/CHANGELOG.md b/CHANGELOG.md
index 061acff074d..c6e84f799c9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
+ * Remove dependency on CUDA from presets for Triton Inference Server ([pull #1151](https://github.com/bytedeco/javacpp-presets/pull/1151))
* Disable signal handlers of DepthAI known to cause issues with the JDK ([issue #1118](https://github.com/bytedeco/javacpp-presets/issues/1118))
* Upgrade presets for Gym 0.22.0, ALE 0.7.4, ONNX 1.11.0, and their dependencies
diff --git a/tritonserver/platform/pom.xml b/tritonserver/platform/pom.xml
index 7c4507af9be..f5c3f769342 100644
--- a/tritonserver/platform/pom.xml
+++ b/tritonserver/platform/pom.xml
@@ -20,16 +20,6 @@
-
- org.bytedeco
- cuda-platform
- 11.6-8.3-${project.parent.version}
-
-
- org.bytedeco
- tensorrt-platform
- 8.2-${project.parent.version}
-
${project.groupId}
${javacpp.moduleId}
@@ -53,6 +43,11 @@
+
+ com.google.code.gson
+ gson
+ 2.8.8
+
@@ -121,6 +116,22 @@
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+ 3.2.4
+
+
+ package
+
+ shade
+
+
+ true
+
+
+
+
diff --git a/tritonserver/pom.xml b/tritonserver/pom.xml
index 66adc798051..fe9cfed8fa8 100644
--- a/tritonserver/pom.xml
+++ b/tritonserver/pom.xml
@@ -15,16 +15,6 @@
JavaCPP Presets for Triton Inference Server
-
- org.bytedeco
- cuda
- 11.6-8.3-${project.parent.version}
-
-
- org.bytedeco
- tensorrt
- 8.2-${project.parent.version}
-
org.bytedeco
javacpp
@@ -45,18 +35,6 @@
ISO-8859-1
-
-
- org.bytedeco
- cuda
- 11.6-8.3-${project.parent.version}
-
-
- org.bytedeco
- tensorrt
- 8.2-${project.parent.version}
-
-
maven-jar-plugin
diff --git a/tritonserver/samples/SimpleCPUOnly.java b/tritonserver/samples/SimpleCPUOnly.java
index a86c1baf107..ec95546403b 100644
--- a/tritonserver/samples/SimpleCPUOnly.java
+++ b/tritonserver/samples/SimpleCPUOnly.java
@@ -66,7 +66,7 @@ protected static class DeleteDeallocator extends TRITONSERVER_Server implements
System.err.println(msg);
}
- System.err.println("Usage: java " + Simple.class.getSimpleName() + " [options]");
+ System.err.println("Usage: java " + SimpleCPUOnly.class.getSimpleName() + " [options]");
System.err.println("\t-v Enable verbose logging");
System.err.println("\t-r [model repository absolute path]");
diff --git a/tritonserver/samples/pom.xml b/tritonserver/samples/pom.xml
index 156a0a23cf9..aeca998b291 100644
--- a/tritonserver/samples/pom.xml
+++ b/tritonserver/samples/pom.xml
@@ -2,7 +2,7 @@
4.0.0
org.bytedeco.tritonserver
simple
- 1.5.7
+ 1.5.8-SNAPSHOT
Simple
1.8
@@ -11,39 +11,22 @@
org.bytedeco
- tritonserver-platform
- 2.18-1.5.7
+ cuda-platform
+ 11.6-8.3-1.5.8-SNAPSHOT
+
+
+ org.bytedeco
+ tensorrt-platform
+ 8.2-1.5.8-SNAPSHOT
- com.google.code.gson
- gson
- 2.8.8
+ org.bytedeco
+ tritonserver-platform
+ 2.18-1.5.8-SNAPSHOT
+ shaded
.
-
-
- org.apache.maven.plugins
- maven-shade-plugin
- 3.2.4
-
-
- package
-
- shade
-
-
-
-
-
- Simple
-
-
-
-
-
-
-
diff --git a/tritonserver/src/main/java/org/bytedeco/tritonserver/presets/tritonserver.java b/tritonserver/src/main/java/org/bytedeco/tritonserver/presets/tritonserver.java
index 57ba8a28bd2..ebed413d826 100644
--- a/tritonserver/src/main/java/org/bytedeco/tritonserver/presets/tritonserver.java
+++ b/tritonserver/src/main/java/org/bytedeco/tritonserver/presets/tritonserver.java
@@ -32,29 +32,18 @@
import org.bytedeco.javacpp.tools.InfoMap;
import org.bytedeco.javacpp.tools.InfoMapper;
-import org.bytedeco.cuda.presets.cudart;
-import org.bytedeco.cuda.presets.cublas;
-import org.bytedeco.cuda.presets.cudnn;
-import org.bytedeco.cuda.presets.nvrtc;
-import org.bytedeco.tensorrt.presets.nvinfer;
-import org.bytedeco.tensorrt.presets.nvinfer_plugin;
-import org.bytedeco.tensorrt.presets.nvonnxparser;
-import org.bytedeco.tensorrt.presets.nvparsers;
-
/**
*
* @author Jack He
*/
@Properties(
- inherit = {cublas.class, cudnn.class, nvrtc.class, nvinfer.class, nvinfer_plugin.class, nvonnxparser.class, nvparsers.class},
value = {
@Platform(
value = {"linux-arm64", "linux-ppc64le", "linux-x86_64", "windows-x86_64"},
include = {"tritonserver.h", "tritonbackend.h", "tritonrepoagent.h"},
- exclude = {"", ""},
link = "tritonserver",
- includepath = {"/opt/tritonserver/include/triton/core/", "/opt/tritonserver/include/", "/usr/local/cuda/include/", "/usr/include"},
- linkpath = {"/usr/local/cuda/lib64/", "/opt/tritonserver/lib/"}
+ includepath = {"/opt/tritonserver/include/triton/core/", "/opt/tritonserver/include/", "/usr/include"},
+ linkpath = {"/opt/tritonserver/lib/"}
),
@Platform(
value = "windows-x86_64",
@@ -66,46 +55,13 @@
target = "org.bytedeco.tritonserver.tritonserver",
global = "org.bytedeco.tritonserver.global.tritonserver"
)
-public class tritonserver implements LoadEnabled, InfoMapper {
+public class tritonserver implements InfoMapper {
static { Loader.checkVersion("org.bytedeco", "tritonserver"); }
-
- @Override public void init(ClassProperties properties) {
- String platform = properties.getProperty("platform");
- List preloads = properties.get("platform.preload");
- List resources = properties.get("platform.preloadresource");
-
- // Only apply this at load time since we don't want to copy the CUDA libraries here
- if (!Loader.isLoadLibraries()) {
- return;
- }
- int i = 0;
- String[] libs = {"cudart", "cublasLt", "cublas", "cudnn", "nvrtc",
- "cudnn_ops_infer", "cudnn_ops_train", "cudnn_adv_infer",
- "cudnn_adv_train", "cudnn_cnn_infer", "cudnn_cnn_train",
- "nvinfer", "nvinfer_plugin", "nvonnxparser", "nvparsers"};
- for (String lib : libs) {
- if (platform.startsWith("linux")) {
- lib += lib.startsWith("cudnn") ? "@.8" : lib.equals("cudart") ? "@.11.0" : lib.equals("nvrtc") ? "@.11.2" : "@.11";
- lib += lib.startsWith("nvinfer") ? "@.8" : lib.equals("nvonnxparser") ? "@.8" : lib.equals("nvparsers") ? "@.8" :"@.8";
- } else if (platform.startsWith("windows")) {
- lib += lib.startsWith("cudnn") ? "64_8" : lib.equals("cudart") ? "64_110" : lib.equals("nvrtc") ? "64_112_0" : "64_11";
- lib += lib.startsWith("nvinfer") ? "64_8" : lib.equals("nvonnxparser") ? "64_8" : lib.equals("nvparsers") ? "64_8" :"64_8";
- } else {
- continue; // no CUDA
- }
- if (!preloads.contains(lib)) {
- preloads.add(i++, lib);
- }
- }
- if (i > 0) {
- resources.add("/org/bytedeco/cuda/");
- resources.add("/org/bytedeco/tensorrt/");
- }
- }
-
public void map(InfoMap infoMap) {
infoMap.putFirst(new Info().enumerate(false))
.put(new Info("bool").cast().valueTypes("boolean").pointerTypes("boolean[]", "BoolPointer"))
+ .put(new Info("const char").pointerTypes("String", "@Cast(\"const char*\") BytePointer"))
+ .put(new Info("std::size_t").cast().valueTypes("long").pointerTypes("LongPointer", "LongBuffer", "long[]"))
.put(new Info("TRITONSERVER_EXPORT", "TRITONSERVER_DECLSPEC",
"TRITONBACKEND_DECLSPEC", "TRITONBACKEND_ISPEC",
"TRITONREPOAGENT_DECLSPEC", "TRITONREPOAGENT_ISPEC").cppTypes().annotations())
diff --git a/tritonserver/src/main/java9/module-info.java b/tritonserver/src/main/java9/module-info.java
index 3fea113a11a..6a1b64a9d46 100644
--- a/tritonserver/src/main/java9/module-info.java
+++ b/tritonserver/src/main/java9/module-info.java
@@ -1,7 +1,5 @@
module org.bytedeco.tritonserver {
requires transitive org.bytedeco.javacpp;
- requires transitive org.bytedeco.cuda;
- requires transitive org.bytedeco.tensorrt;
exports org.bytedeco.tritonserver.global;
exports org.bytedeco.tritonserver.presets;
exports org.bytedeco.tritonserver;