2 Commits

Author SHA1 Message Date
mozempk
d0148260e3 test: add unit test infrastructure (Docker tester stage + CI)
All checks were successful
Build & Push Docker Image / test (push) Successful in 5m42s
Build & Push Docker Image / build-and-push (push) Successful in 21s
- Add Dockerfile 'tester' stage (FROM builder):
  - Symlinks /usr/local/cuda/lib64/stubs/libcuda.so → libcuda.so.1
    so the test binary can satisfy the dynamic linker without a real GPU
  - Runs `cargo test --release` reusing the cached release build artifacts
    (no recompilation — tests complete in ~6s)
  - docker build --target tester . to run all 30 unit tests

- Add 'test' job to .gitea/workflows/docker-build.yml:
  - Runs before build-and-push (build-and-push needs: test)
  - Builds --target tester with registry build cache
  - Gate: build-and-push only runs when all tests pass

- Add run_tests.sh convenience script for local use:
  - Accepts optional test name filter as first argument
  - Respects CUDA_VERSION / UBUNTU_VERSION env overrides

All 30 unit tests pass:
  error::tests     — 7 tests (OOM detection, ModelNotReady HTTP shape)
  models::tests    — 17 tests (state machine, serialization, retry-after)
  worker::tests    — 6 tests (chunk ranges, silence snap/trim)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-08 18:20:52 +02:00
mozempk
16cb6ca661 feat: GPU-accelerated Whisper API for RTX 2080 (sm_75)
All checks were successful
Build & Push Docker Image / build-and-push (push) Successful in 11m13s
- Pure Rust: Axum 0.7 + whisper-rs 0.13 (CUDA FFI)
- Async job queue with SSE progress streaming
- Webhook delivery with 5x exponential backoff
- Disk-persisted job state (survives restarts)
- Anti-hallucination params: no_speech_thold, entropy_thold, suppress_blank
- CUDA sm_75 flags: GGML_CUDA_FORCE_MMQ, GGML_CUDA_GRAPHS, GGML_CUDA_FA_ALL_QUANTS
- Configurable via env: CUDA_DEVICE, WHISPER_MODEL_PATH, PORT, DATA_DIR
- Gitea Actions CI: build + push to git.sal.giize.com registry
- Multi-stage Dockerfile with customizable CUDA_VERSION ARG

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-05 22:47:24 +02:00