Commit ea9c117a authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: publish_libtorch_mirror.sh - libtorch -> mirror maven layout (piece 4B)

Server-side copies the already-uploaded libtorch zip into
mirror.elphel.com/maven-dependencies/org/pytorch/libtorch-cxx11-cu128/2.7.1/ (maven
layout: .zip + .pom + .sha1/.md5, no 3.8GB re-upload) so imagej-elphel's -Plibtorch
profile can dependency:unpack it. Pairs with fetch_libtorch.sh (direct download).
Co-Authored-By: 's avatarClaude Opus 4.8 (1M context) <noreply@anthropic.com>
parent 9202dd30
#!/usr/bin/env bash
# Publish the libtorch native runtime to mirror.elphel.com/maven-dependencies in MAVEN layout, so the
# imagej-elphel `-Plibtorch` profile can dependency:unpack it. Server-side COPY of the already-uploaded
# zip (no 3.8GB re-upload). Run from .224 (direct ssh to community.elphel.com). By Claude on 2026-06-27.
#
# groupId=org.pytorch artifactId=libtorch-cxx11-cu128 version=2.7.1 packaging=zip
# -> .../maven-dependencies/org/pytorch/libtorch-cxx11-cu128/2.7.1/libtorch-cxx11-cu128-2.7.1.{zip,pom}(+.sha1/.md5)
set -euo pipefail
SSH_TARGET="${SSH_TARGET:-elphel5@community.elphel.com}"
GID_PATH="org/pytorch"; AID="libtorch-cxx11-cu128"; VER="2.7.1"
SRC_REL="libtorch/libtorch-cxx11-abi-shared-with-deps-2.7.1-cu128.zip" # existing upload (fetch_libtorch.sh source)
ssh "$SSH_TARGET" GID_PATH="$GID_PATH" AID="$AID" VER="$VER" SRC_REL="$SRC_REL" 'bash -s' <<'REMOTE'
set -euo pipefail
ROOT=~/public_html/elphel.com/mirror
SRC="$ROOT/$SRC_REL"
DST="$ROOT/maven-dependencies/$GID_PATH/$AID/$VER"
BASE="$AID-$VER"
[ -f "$SRC" ] || { echo "source zip missing: $SRC"; exit 1; }
mkdir -p "$DST"
cp -f "$SRC" "$DST/$BASE.zip"
cat > "$DST/$BASE.pom" <<POM
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>org.pytorch</groupId>
<artifactId>$AID</artifactId>
<version>$VER</version>
<packaging>zip</packaging>
<description>LibTorch C++ runtime (cxx11 ABI, CUDA 12.8) for native DNN inference; mirror of pytorch.org download.</description>
</project>
POM
for f in "$BASE.zip" "$BASE.pom"; do
( cd "$DST" && sha1sum "$f" | awk '{print $1}' > "$f.sha1" && md5sum "$f" | awk '{print $1}' > "$f.md5" )
done
echo "published:"; ls -la "$DST"
REMOTE
echo "done."
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