Spaces:
Sleeping
Sleeping
File size: 1,955 Bytes
313814b 234d2f2 313814b e111d94 313814b 234d2f2 e1a6910 234d2f2 af21424 3d5e897 313814b 3d5e897 313814b 8ad3023 234d2f2 760dfe6 e1a6910 234d2f2 e1a6910 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
version: "3"
tasks:
server:
cmds:
- pkill --signal SIGKILL --echo --full 'uvicorn --factory --host 0.0.0.0 faster_whisper_server.main:create_app' || true
- uvicorn --factory --host 0.0.0.0 faster_whisper_server.main:create_app {{.CLI_ARGS}}
sources:
- src/**/*.py
test:
cmds:
- pytest -o log_cli=true -o log_cli_level=DEBUG {{.CLI_ARGS}}
sources:
- src/**/*.py
build:
cmds:
- docker compose build
sources:
- Dockerfile.*
- src/**/*.py
create-multi-arch-builder: docker buildx create --name main --driver=docker-container
docker-build:
cmds:
- docker compose build --builder main {{.CLI_ARGS}}
sources:
- Dockerfile.*
- src/faster_whisper_server/*.py
cii:
cmds:
- act --rm --action-offline-mode --secret-file .secrets {{.CLI_ARGS}}
# Python's urllib3 takes forever when ipv6 is enabled
# https://support.nordvpn.com/hc/en-us/articles/20164669224337-How-to-disable-IPv6-on-Linux
disable-ipv6: sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 && sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
enable-ipv6: sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0 && sudo sysctl -w net.ipv6.conf.default.disable_ipv6=0
# NOTE: no longer used. Should be removed, but keeping for now.
download-test-data:
# Downlod audio files for testing into `tests/data`
cmds:
- huggingface-cli download --repo-type dataset 'google/fleurs' 'data/en_us/audio/dev.tar.gz'
- cp $HOME/.cache/huggingface/hub/datasets--google--fleurs/snapshots/199e4ae37915137c555b1765c01477c216287d34/data/en_us/audio/dev.tar.gz .
- tar xzf dev.tar.gz
- rm dev.tar.gz
- mkdir -p tests/data
- mv dev/* tests/data
- rm -r dev
- ls tests/data/*.wav | parallel ffmpeg -y -hide_banner -i {} -ac 1 -ar 16000 -f s16le -acodec pcm_s16le {.}.raw
- ls tests/data | grep -v '\.raw$' | xargs -I {} rm -rf tests/data/{}
|