mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: pre-built release archives + AI install fixes (#202)
Add pre-built release archives (Linux amd64/arm64) to the release workflow, published as GitHub Release assets. Each archive is a self-contained tar.gz (~240MB) with built frontend, API source, and production node_modules. Users extract and run without needing pnpm build. Also includes AI install manifest fixes for Proxmox/bare-metal users: - Pin setuptools<75 for Python 3.13 basicsr compatibility - Pre-install basicsr with --no-build-isolation before realesrgan - Loosen mediapipe pins from == to >= for Python 3.13 wheels - Add retry logic to HuggingFace model downloads
This commit is contained in:
@@ -69,6 +69,66 @@ jobs:
|
||||
--notes-file /tmp/release-notes.md
|
||||
echo "Release notes updated successfully."
|
||||
|
||||
prebuilt:
|
||||
name: Archive (${{ matrix.arch }})
|
||||
needs: release
|
||||
if: needs.release.outputs.new_version
|
||||
permissions:
|
||||
contents: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- runner: ubuntu-latest
|
||||
arch: amd64
|
||||
- runner: ubuntu-24.04-arm
|
||||
arch: arm64
|
||||
runs-on: ${{ matrix.runner }}
|
||||
steps:
|
||||
- name: Checkout release tag
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
ref: v${{ needs.release.outputs.new_version }}
|
||||
|
||||
- uses: ./.github/actions/setup
|
||||
|
||||
- name: Build web frontend
|
||||
run: pnpm --filter @snapotter/web build
|
||||
|
||||
- name: Prune to production dependencies
|
||||
run: |
|
||||
rm -rf node_modules apps/*/node_modules packages/*/node_modules
|
||||
npm pkg delete scripts.prepare
|
||||
pnpm install --prod --frozen-lockfile
|
||||
|
||||
- name: Create archive
|
||||
env:
|
||||
VERSION: ${{ needs.release.outputs.new_version }}
|
||||
ARCH: ${{ matrix.arch }}
|
||||
run: |
|
||||
rm -rf apps/web/src apps/web/public apps/web/index.html apps/web/tsconfig.json
|
||||
rm -rf apps/landing apps/docs apps/demo
|
||||
rm -rf tests .github .husky scripts
|
||||
rm -rf .releaserc.json biome.json .editorconfig .gitattributes
|
||||
rm -rf .git .gitignore
|
||||
rm -f CHANGELOG.md LICENSE README.md CONTRIBUTING.md SECURITY.md
|
||||
|
||||
ARCHIVE_NAME="snapotter-v${VERSION}-linux-${ARCH}.tar.gz"
|
||||
cd ..
|
||||
mv SnapOtter snapotter
|
||||
tar czf "/tmp/${ARCHIVE_NAME}" snapotter/
|
||||
mv snapotter SnapOtter
|
||||
cd SnapOtter
|
||||
|
||||
echo "archive_name=${ARCHIVE_NAME}" >> "$GITHUB_ENV"
|
||||
echo "Archive: ${ARCHIVE_NAME} ($(du -sh /tmp/${ARCHIVE_NAME} | cut -f1))"
|
||||
|
||||
- name: Upload to GitHub Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VERSION: ${{ needs.release.outputs.new_version }}
|
||||
run: gh release upload "v${VERSION}" "/tmp/${archive_name}" --clobber
|
||||
|
||||
docker:
|
||||
name: Build (${{ matrix.platform }})
|
||||
needs: release
|
||||
|
||||
@@ -45,6 +45,7 @@ docs/*
|
||||
PRD.md
|
||||
|
||||
# Ad-hoc test screenshots and reports
|
||||
tests/e2e/screenshots/qa/**/*.png
|
||||
test-*.png
|
||||
!tests/fixtures/*.png
|
||||
stirling-pdf-*.png
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
"estimatedSize": "4-5 GB",
|
||||
"packages": {
|
||||
"common": ["rembg==2.0.62"],
|
||||
"amd64": ["onnxruntime-gpu==1.20.1", "mediapipe==0.10.21"],
|
||||
"arm64": ["onnxruntime==1.20.1", "mediapipe==0.10.18"]
|
||||
"amd64": ["onnxruntime-gpu==1.20.1", "mediapipe>=0.10.21"],
|
||||
"arm64": ["onnxruntime==1.20.1", "mediapipe>=0.10.18"]
|
||||
},
|
||||
"pipFlags": {},
|
||||
"postInstall": [],
|
||||
@@ -57,8 +57,8 @@
|
||||
"estimatedSize": "200-300 MB",
|
||||
"packages": {
|
||||
"common": [],
|
||||
"amd64": ["mediapipe==0.10.21"],
|
||||
"arm64": ["mediapipe==0.10.18"]
|
||||
"amd64": ["mediapipe>=0.10.21"],
|
||||
"arm64": ["mediapipe>=0.10.18"]
|
||||
},
|
||||
"pipFlags": {},
|
||||
"postInstall": [],
|
||||
@@ -135,17 +135,19 @@
|
||||
"description": "AI upscaling, face enhancement, and noise removal",
|
||||
"estimatedSize": "4-5 GB",
|
||||
"packages": {
|
||||
"common": ["codeformer-pip==0.0.4", "huggingface-hub", "einops"],
|
||||
"common": ["codeformer-pip==0.0.4", "huggingface-hub", "einops", "setuptools<75"],
|
||||
"amd64": [
|
||||
"torch==2.7.0+cu126 torchvision==0.22.0+cu126 --index-url https://download.pytorch.org/whl/cu126",
|
||||
"lpips",
|
||||
"basicsr==1.4.2",
|
||||
"realesrgan==0.3.0",
|
||||
"mediapipe==0.10.21"
|
||||
"mediapipe>=0.10.21"
|
||||
],
|
||||
"arm64": ["lpips", "realesrgan==0.3.0", "mediapipe==0.10.18"]
|
||||
"arm64": ["lpips", "basicsr==1.4.2", "realesrgan==0.3.0", "mediapipe>=0.10.18"]
|
||||
},
|
||||
"pipFlags": {
|
||||
"codeformer-pip==0.0.4": "--no-deps"
|
||||
"codeformer-pip==0.0.4": "--no-deps",
|
||||
"basicsr==1.4.2": "--no-build-isolation"
|
||||
},
|
||||
"postInstall": ["numpy==1.26.4"],
|
||||
"models": [
|
||||
@@ -209,18 +211,26 @@
|
||||
"description": "Restore old or damaged photos",
|
||||
"estimatedSize": "800 MB - 1 GB",
|
||||
"packages": {
|
||||
"common": ["codeformer-pip==0.0.4", "huggingface-hub"],
|
||||
"common": ["codeformer-pip==0.0.4", "huggingface-hub", "setuptools<75"],
|
||||
"amd64": [
|
||||
"onnxruntime-gpu==1.20.1",
|
||||
"mediapipe==0.10.21",
|
||||
"mediapipe>=0.10.21",
|
||||
"torch==2.7.0+cu126 torchvision==0.22.0+cu126 --index-url https://download.pytorch.org/whl/cu126",
|
||||
"lpips",
|
||||
"basicsr==1.4.2",
|
||||
"realesrgan==0.3.0"
|
||||
],
|
||||
"arm64": ["onnxruntime==1.20.1", "mediapipe==0.10.18", "lpips", "realesrgan==0.3.0"]
|
||||
"arm64": [
|
||||
"onnxruntime==1.20.1",
|
||||
"mediapipe>=0.10.18",
|
||||
"lpips",
|
||||
"basicsr==1.4.2",
|
||||
"realesrgan==0.3.0"
|
||||
]
|
||||
},
|
||||
"pipFlags": {
|
||||
"codeformer-pip==0.0.4": "--no-deps"
|
||||
"codeformer-pip==0.0.4": "--no-deps",
|
||||
"basicsr==1.4.2": "--no-build-isolation"
|
||||
},
|
||||
"postInstall": ["numpy==1.26.4"],
|
||||
"models": [
|
||||
|
||||
Reference in New Issue
Block a user