feat: add GHCR Docker workflow, update README with container registry instructions

- New .github/workflows/docker.yml publishes images to ghcr.io on tag push
- README Docker section now leads with 'docker pull' from GHCR
- docker-compose.yml defaults to GHCR image with build-from-source fallback
- Dockerfile: copy README.md for hatchling metadata resolution
This commit is contained in:
debpalash
2026-05-03 09:04:49 +05:30
parent a7ef134175
commit cfab2a500a
6 changed files with 122 additions and 13 deletions
+68
View File
@@ -0,0 +1,68 @@
# Publish Docker images to GitHub Container Registry (GHCR).
#
# Triggers:
# - push of a tag matching `v*` (e.g. `v0.2.7`) → pushed as :0.2.7 + :latest
# - workflow_dispatch → pushed as :sha-<short> (for testing)
#
# Images land at: ghcr.io/debpalash/omnivoice-studio
name: Docker (GHCR)
on:
push:
tags: ['v*']
workflow_dispatch:
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
build-and-push:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
# QEMU enables cross-platform builds (arm64 on x64 runner).
# Skipped for now — only building linux/amd64.
# - uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extracts semver tags from the git ref:
# v0.2.7 → 0.2.7, latest
# manual dispatch → sha-abc1234
- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=sha-,format=short
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: deploy/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
+3
View File
@@ -81,3 +81,6 @@ frontend/src-tauri/binaries/ffmpeg
# cuDNN 8 compat libs (auto-installed by scripts/setup_cudnn.py)
cudnn8_compat/
test-results/
# Research repos (local only)
research/
+38 -4
View File
@@ -115,17 +115,51 @@ That's it. Open [localhost:3901](http://localhost:3901) and start cloning voices
### Docker
Pull the pre-built image from **GitHub Container Registry** — no build step needed:
```bash
docker pull ghcr.io/debpalash/omnivoice-studio:latest
```
Run it:
```bash
# CPU mode
docker compose up --build -d
docker run -d --name omnivoice \
-p 127.0.0.1:3900:3900 \
-v omnivoice-data:/app/omnivoice_data \
ghcr.io/debpalash/omnivoice-studio:latest
# Or with NVIDIA GPU
docker compose --profile gpu up --build -d
# NVIDIA GPU mode
docker run -d --name omnivoice --gpus all \
-p 127.0.0.1:3900:3900 \
-v omnivoice-data:/app/omnivoice_data \
ghcr.io/debpalash/omnivoice-studio:latest
```
Or use **Docker Compose** with the GHCR image:
```bash
# CPU mode
docker compose -f deploy/docker-compose.yml up -d
# GPU mode
docker compose -f deploy/docker-compose.yml --profile gpu up -d
```
Open [http://localhost:3900](http://localhost:3900) once the health check passes. First run downloads ~4 GB of model weights — progress is shown in `docker compose logs -f`.
> **Network access:** the container binds to `127.0.0.1` only. To reach OmniVoice from another machine on your LAN, change the port mapping in `docker-compose.yml` to `"0.0.0.0:3900:3900"`. OmniVoice ships no built-in authentication — when exposing it beyond your machine, put it behind a reverse proxy with auth (Caddy `basic_auth`, nginx + htpasswd, Tailscale, etc.).
<details>
<summary><b>Build from source instead of pulling</b></summary>
<br/>
```bash
docker compose -f deploy/docker-compose.yml up --build -d
```
</details>
> **Network access:** the container binds to `127.0.0.1` only. To reach OmniVoice from another machine on your LAN, change the port mapping to `"0.0.0.0:3900:3900"`. OmniVoice ships no built-in authentication — when exposing it beyond your machine, put it behind a reverse proxy with auth (Caddy `basic_auth`, nginx + htpasswd, Tailscale, etc.).
### Desktop App
+2 -2
View File
@@ -36,8 +36,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# Install `uv` for blazing-fast reliable pip resolution
RUN pip install --no-cache-dir uv
# Copy python packaging specs
COPY pyproject.toml uv.lock ./
# Copy python packaging specs (README.md required by hatchling metadata)
COPY pyproject.toml uv.lock README.md ./
# Install the project (non-editable — no need for -e in containers).
# Uses `uv` for exponentially faster resolution than plain pip.
+10 -6
View File
@@ -19,9 +19,12 @@
services:
# ── CPU mode (default) ──────────────────────────────────────
omnivoice:
build:
context: ..
dockerfile: deploy/Dockerfile
image: ghcr.io/debpalash/omnivoice-studio:latest
# To build from source instead of pulling, comment out `image:` and
# uncomment the two lines below:
# build:
# context: ..
# dockerfile: deploy/Dockerfile
container_name: omnivoice-studio
ports:
- "127.0.0.1:3900:3900"
@@ -42,9 +45,10 @@ services:
# ── GPU mode — activate with: docker compose --profile gpu up
omnivoice-gpu:
build:
context: ..
dockerfile: deploy/Dockerfile
image: ghcr.io/debpalash/omnivoice-studio:latest
# build:
# context: ..
# dockerfile: deploy/Dockerfile
container_name: omnivoice-studio-gpu
profiles: ["gpu"]
ports:
Generated
+1 -1
View File
@@ -2913,7 +2913,7 @@ wheels = [
[[package]]
name = "omnivoice"
version = "0.2.4"
version = "0.2.7"
source = { editable = "." }
dependencies = [
{ name = "accelerate" },