Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAMEL-21018: Create a Camel TorchServe component #15804

Merged
merged 5 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bom/camel-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2067,6 +2067,11 @@
<artifactId>camel-tooling-util</artifactId>
<version>4.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-torchserve</artifactId>
<version>4.9.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-tracing</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions catalog/camel-allcomponents/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1821,6 +1821,11 @@
<artifactId>camel-timer</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-torchserve</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-tracing</artifactId>
Expand Down
196 changes: 196 additions & 0 deletions components/camel-ai/camel-torchserve/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>camel-ai-parent</artifactId>
<groupId>org.apache.camel</groupId>
<version>4.9.0-SNAPSHOT</version>
</parent>

<artifactId>camel-torchserve</artifactId>
<packaging>jar</packaging>
<name>Camel :: AI :: TorchServe</name>
<description>Provide access to PyTorch TorchServe servers to run inference with PyTorch models remotely</description>

<properties>
</properties>

<dependencies>
<!-- camel -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-support</artifactId>
</dependency>

<!-- Dependencies required by the generated client -->
<!-- HTTP client: apache client -->
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>${httpclient-version}</version>
</dependency>

<!-- JSON processing: jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson2-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson2-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson2-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jakarta.rs</groupId>
<artifactId>jackson-jakarta-rs-json-provider</artifactId>
<version>${jackson2-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${jackson2-version}</version>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
<version>${jackson-databind-nullable-version}</version>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>${jakarta-annotation-api-version}</version>
</dependency>

<!-- testing -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
<version>${wiremock-version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>${openapi-generator-version}</version>
<executions>
<execution>
<id>generate-inference</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/openapi/inference.json</inputSpec>
<generatorName>java</generatorName>
<apiPackage>org.apache.camel.component.torchserve.client.inference.api</apiPackage>
<modelPackage>org.apache.camel.component.torchserve.client.inference.model</modelPackage>
<invokerPackage>org.apache.camel.component.torchserve.client.inference.invoker
</invokerPackage>
<configOptions>
<useJakartaEe>true</useJakartaEe>
<library>apache-httpclient</library>
</configOptions>
<generateApiTests>false</generateApiTests>
<generateModelTests>false</generateModelTests>
<skipValidateSpec>true</skipValidateSpec>
</configuration>
</execution>
<execution>
<id>generate-management</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/openapi/management.json</inputSpec>
<generatorName>java</generatorName>
<apiPackage>org.apache.camel.component.torchserve.client.management.api</apiPackage>
<modelPackage>org.apache.camel.component.torchserve.client.management.model</modelPackage>
<invokerPackage>org.apache.camel.component.torchserve.client.management.invoker
</invokerPackage>
<configOptions>
<useJakartaEe>true</useJakartaEe>
<library>apache-httpclient</library>
</configOptions>
<generateModelTests>false</generateModelTests>
<generateApiTests>false</generateApiTests>
<skipValidateSpec>true</skipValidateSpec>
</configuration>
</execution>
<execution>
<id>generate-metrics</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/openapi/metrics.json</inputSpec>
<generatorName>java</generatorName>
<apiPackage>org.apache.camel.component.torchserve.client.metrics.api</apiPackage>
<modelPackage>org.apache.camel.component.torchserve.client.metrics.model</modelPackage>
<invokerPackage>org.apache.camel.component.torchserve.client.metrics.invoker
</invokerPackage>
<configOptions>
<useJakartaEe>true</useJakartaEe>
<library>apache-httpclient</library>
</configOptions>
<generateApiTests>false</generateApiTests>
<generateModelTests>false</generateModelTests>
<skipValidateSpec>true</skipValidateSpec>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/openapi/src/main/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Loading
Loading