Skip to content

Commit

Permalink
Publish torchserve-plugins-sdk artifacts to Maven Central repository (#…
Browse files Browse the repository at this point in the history
…2422)

* Fix missing torchserve-plugins-sdk artifacts and version

* Add support for releasing torchserve plugins sdk to Maven Central

* enable gpg signing

* Add necessary gpg arguments and update distribution management

* Revert workaround used to build and install torchserve-plugins-sdk locally

* Disable building torchserve-plugins-sdk in CI

---------

Co-authored-by: Naman Nandan <namannan@amazon.com>
  • Loading branch information
namannandan and Naman Nandan authored Jun 28, 2023
1 parent ec3b992 commit 2551a99
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 32 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/ci_cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@ jobs:
retry_on: error
command: |
python torchserve_sanity.py
- name: mvn install - unix
if: matrix.os != 'windows-latest'
run: |
cd serving-sdk/ && ./mvnw clean install -q && cd ../
- name: mvn install - windows
if: matrix.os == 'windows-latest'
run: |
cd serving-sdk/ && .\mvnw.cmd clean install -q && cd ../
# Any coverage.xml will be picked up by this step
# Just make sure each coverage.xml is in a different folder
- name: Upload codecov
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/ci_gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ jobs:
max_attempts: 3
command: |
python torchserve_sanity.py
- name: mvn install
run: |
cd serving-sdk/ && ./mvnw clean install -q && cd ../
# Any coverage.xml will be picked up by this step
# Just make sure each coverage.xml is in a different folder
Expand Down
2 changes: 0 additions & 2 deletions frontend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ allprojects {

repositories {
mavenCentral()
jcenter()
mavenLocal()
}

apply plugin: 'idea'
Expand Down
34 changes: 30 additions & 4 deletions serving-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
</developer>
</developers>

<scm>
<connection>scm:git:git://github.com/pytorch/serve.git</connection>
<developerConnection>scm:git:ssh://github.com:pytorch/serve.git</developerConnection>
<url>https://github.com/pytorch/serve</url>
</scm>

<url>http://maven.apache.org</url>
<properties>
<repo_url>file://${project.build.directory}/repo</repo_url>
Expand Down Expand Up @@ -61,6 +67,12 @@
<version>1.6</version>
<configuration>
<skip>${skip.gpg}</skip>
<keyname>${gpg.keyname}</keyname>
<passphrase>${gpg.passphrase}</passphrase>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -112,7 +124,7 @@
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
Expand Down Expand Up @@ -142,14 +154,28 @@
<target>8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>bintray-pytorch-maven</id>
<name>pytorch-maven</name>
<url>https://api.bintray.com/maven/pytorch/maven/org.pytorch:torchserve_plugins_sdk/</url>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</project>
15 changes: 0 additions & 15 deletions ts_scripts/install_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ def install_wget(self):
def install_numactl(self):
pass

def install_torchserve_plugins_sdk(self):
pass


class Linux(Common):
def __init__(self):
Expand Down Expand Up @@ -113,9 +110,6 @@ def install_numactl(self):
if os.system("numactl --show") != 0 or args.force:
os.system(f"{self.sudo_cmd}apt-get install -y numactl")

def install_torchserve_plugins_sdk(self):
os.system(f"cd {REPO_ROOT}/serving-sdk/ && ./mvnw clean install -q && cd ../")


class Windows(Common):
def __init__(self):
Expand All @@ -134,11 +128,6 @@ def install_wget(self):
def install_numactl(self):
pass

def install_torchserve_plugins_sdk(self):
os.system(
f"cd {REPO_ROOT}/serving-sdk/ && .\mvnw.cmd clean install -q && cd ../"
)


class Darwin(Common):
def __init__(self):
Expand Down Expand Up @@ -167,9 +156,6 @@ def install_numactl(self):
if os.system("numactl --show") != 0 or args.force:
os.system("brew install numactl")

def install_torchserve_plugins_sdk(self):
os.system(f"cd {REPO_ROOT}/serving-sdk/ && ./mvnw clean install -q && cd ../")


def install_dependencies(cuda_version=None, nightly=False):
os_map = {"Linux": Linux, "Windows": Windows, "Darwin": Darwin}
Expand All @@ -180,7 +166,6 @@ def install_dependencies(cuda_version=None, nightly=False):
system.install_nodejs()
system.install_node_packages()
system.install_numactl()
system.install_torchserve_plugins_sdk()

# Sequence of installation to be maintained
system.install_java()
Expand Down

0 comments on commit 2551a99

Please sign in to comment.