feat: add output filename suffixes, CPU fallback for GPU packages, and fix e2e tests

- Add tool-specific suffix to output filenames so downloads don't overwrite originals (batch & single-tool routes)
- Skip deleting shared models when uninstalling a bundle that shares models with another installed bundle
- Auto-detect NVIDIA GPU and swap GPU-only pip packages (onnxruntime-gpu, paddlepaddle-gpu) for CPU equivalents
- Refactor docker-compose with YAML anchors and explicit cpu/gpu profiles
- Add libheif-plugin-x265 to Dockerfile
- Fix install-all queue logic to handle concurrent individual installs and clear stale errors
- Unify playwright docker config to use same test dir with API_URL env var
- Fix flaky e2e selectors, rename Strip Metadata → Remove Metadata, handle collage custom dropzone, improve fallback test image generation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ashim
2026-04-20 10:56:47 +08:00
co-authored by Claude Opus 4.6
parent 92c0579a49
commit 6edb92c242
17 changed files with 234 additions and 66 deletions
+13 -1
View File
@@ -228,14 +228,26 @@ export async function registerFeatureRoutes(app: FastifyInstance): Promise<void>
return reply.status(409).send({ error: `Bundle "${bundleId}" is not installed` });
}
// Read manifest to find model files to delete
// Read manifest to find model files to delete, but skip models
// that are still needed by another installed bundle.
const manifest = readManifest();
if (manifest) {
const manifestBundle = manifest.bundles[bundleId];
if (manifestBundle) {
// Collect model paths that OTHER installed bundles still need
const sharedPaths = new Set<string>();
for (const [otherId, otherBundle] of Object.entries(manifest.bundles)) {
if (otherId === bundleId) continue;
if (!isFeatureInstalled(otherId)) continue;
for (const m of (otherBundle as any).models ?? []) {
if (m.path) sharedPaths.add(m.path);
}
}
const modelsDir = getModelsDir();
for (const model of manifestBundle.models) {
if (!model.path) continue;
if (sharedPaths.has(model.path)) continue; // still needed
const modelPath = join(modelsDir, model.path);
try {
if (existsSync(modelPath)) {