Commit 5221ec2c authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: opt-in -Plibtorch Maven profile to unpack libtorch from the mirror (piece 4B)

Adds an OFF-by-default profile that dependency:unpacks the libtorch native runtime
(org.pytorch:libtorch-cxx11-cu128:2.7.1:zip, cu128) from mirror.elphel.com/maven-dependencies
into target/libtorch-dist for the native DNN backend (libtpdnn.so / CuasDnnLocal) on a
deployment box. The default build never downloads the 3.8GB zip.

Artifact published to the mirror in maven layout (server-side copy of the existing zip)
via tile_processor_gpu/jna/publish_libtorch_mirror.sh. Verified: zip + .pom reachable at
the computed maven URL (HTTP 200, 3.78GB), profile parses (mvn -Plibtorch validate OK).
Full unpack deferred (redundant on this box - libtorch already extracted); exercises on
first deployment machine via `mvn -Plibtorch generate-resources`.
Co-Authored-By: 's avatarClaude Opus 4.8 (1M context) <noreply@anthropic.com>
parent 7e296021
......@@ -320,7 +320,41 @@
-->
</dependencies>
</profile>
</profiles>
<!-- Opt-in (mvn -Plibtorch ...): unpack the libtorch native runtime (cu128, ~3.8GB zip) from the
Elphel mirror into target/libtorch-dist for the native DNN backend (libtpdnn.so / CuasDnnLocal).
OFF by default so the normal build never downloads it. Publish the artifact to the mirror with
tile_processor_gpu/jna/publish_libtorch_mirror.sh. By Claude on 06/27/2026. -->
<profile>
<id>libtorch</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<id>unpack-libtorch</id>
<phase>generate-resources</phase>
<goals><goal>unpack</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.pytorch</groupId>
<artifactId>libtorch-cxx11-cu128</artifactId>
<version>2.7.1</version>
<type>zip</type>
<outputDirectory>${project.build.directory}/libtorch-dist</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<resources>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment