Merge remote-tracking branch 'origin/feat/g2p-russian' #2779
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker Smoke | |
| on: | |
| pull_request: | |
| paths: | |
| - ".devops/**" | |
| - "docker-compose*.yml" | |
| - ".dockerignore" | |
| - ".env.example" | |
| - "hf-space/**" | |
| - ".github/workflows/docker-smoke.yml" | |
| - "README.md" | |
| - "CMakeLists.txt" | |
| - "src/**" | |
| - "examples/**" | |
| - "ggml/**" | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".devops/**" | |
| - "docker-compose*.yml" | |
| - ".dockerignore" | |
| - ".env.example" | |
| - "hf-space/**" | |
| - ".github/workflows/docker-smoke.yml" | |
| - "README.md" | |
| - "CMakeLists.txt" | |
| - "src/**" | |
| - "examples/**" | |
| - "ggml/**" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| smoke: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Validate compose YAML | |
| run: | | |
| python3 - <<'PY' | |
| import yaml | |
| for path in ("docker-compose.yml", "docker-compose.cuda.yml"): | |
| with open(path, "r", encoding="utf-8") as f: | |
| yaml.safe_load(f) | |
| print("compose-yaml-ok") | |
| PY | |
| - name: Cache smoke-test model | |
| id: model-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: models/ggml-base.en.bin | |
| key: ggml-model-base-en-v1 | |
| - name: Download a smoke-test model | |
| if: steps.model-cache.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir -p models cache | |
| ./models/download-ggml-model.sh base.en | |
| - name: Build image | |
| run: docker build -f .devops/main.Dockerfile -t crispasr-local:main . | |
| - name: Start server | |
| run: | | |
| cp .env.example .env | |
| { | |
| echo "CRISPASR_MODEL=/models/ggml-base.en.bin" | |
| echo "CRISPASR_BACKEND=whisper" | |
| echo "CRISPASR_LANGUAGE=en" | |
| } >> .env | |
| docker compose up -d | |
| - name: Wait for health | |
| run: | | |
| for _ in $(seq 1 30); do | |
| if curl -fsS http://127.0.0.1:8080/health >/dev/null 2>&1; then | |
| exit 0 | |
| fi | |
| sleep 2 | |
| done | |
| docker compose ps | |
| docker compose logs | |
| exit 1 | |
| - name: Stop stack | |
| if: always() | |
| run: docker compose down -v | |
| hf-space-build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Build Hugging Face Space image | |
| run: docker build -t crispasr-hf-space hf-space/ |