Spaces:
Sleeping
Sleeping
Fedir Zadniprovskyi
commited on
Commit
•
e1a6910
1
Parent(s):
94c7543
chore: add more tasks
Browse files- Taskfile.yaml +23 -1
- flake.nix +1 -0
Taskfile.yaml
CHANGED
@@ -1,11 +1,17 @@
|
|
1 |
version: "3"
|
2 |
tasks:
|
3 |
-
speaches: poetry run uvicorn speaches.main:app {{.CLI_ARGS}}
|
4 |
test:
|
5 |
cmds:
|
6 |
- poetry run pytest -o log_cli=true -o log_cli_level=DEBUG {{.CLI_ARGS}}
|
7 |
sources:
|
8 |
- "**/*.py"
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
build-and-push:
|
10 |
cmds:
|
11 |
- docker compose build --push
|
@@ -13,3 +19,19 @@ tasks:
|
|
13 |
- Dockerfile.*
|
14 |
- speaches/*.py
|
15 |
sync: lsyncd -nodaemon -delay 0 -rsyncssh . gpu-box speaches
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
version: "3"
|
2 |
tasks:
|
3 |
+
speaches: poetry run uvicorn --host 0.0.0.0 speaches.main:app {{.CLI_ARGS}}
|
4 |
test:
|
5 |
cmds:
|
6 |
- poetry run pytest -o log_cli=true -o log_cli_level=DEBUG {{.CLI_ARGS}}
|
7 |
sources:
|
8 |
- "**/*.py"
|
9 |
+
build:
|
10 |
+
cmds:
|
11 |
+
- docker compose build
|
12 |
+
sources:
|
13 |
+
- Dockerfile.*
|
14 |
+
- speaches/*.py
|
15 |
build-and-push:
|
16 |
cmds:
|
17 |
- docker compose build --push
|
|
|
19 |
- Dockerfile.*
|
20 |
- speaches/*.py
|
21 |
sync: lsyncd -nodaemon -delay 0 -rsyncssh . gpu-box speaches
|
22 |
+
# Python's urllib3 takes forever when ipv6 is enabled
|
23 |
+
# https://support.nordvpn.com/hc/en-us/articles/20164669224337-How-to-disable-IPv6-on-Linux
|
24 |
+
disable-ipv6: sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 && sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
|
25 |
+
enable-ipv6: sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0 && sudo sysctl -w net.ipv6.conf.default.disable_ipv6=0
|
26 |
+
download-test-data:
|
27 |
+
# Downlod audio files for testing into `tests/data`
|
28 |
+
cmds:
|
29 |
+
- huggingface-cli download --repo-type dataset 'google/fleurs' 'data/en_us/audio/dev.tar.gz'
|
30 |
+
- cp $HOME/.cache/huggingface/hub/datasets--google--fleurs/snapshots/199e4ae37915137c555b1765c01477c216287d34/data/en_us/audio/dev.tar.gz .
|
31 |
+
- tar xzf dev.tar.gz
|
32 |
+
- rm dev.tar.gz
|
33 |
+
- mkdir -p tests/data
|
34 |
+
- mv dev/* tests/data
|
35 |
+
- rm -r dev
|
36 |
+
- ls tests/data/*.wav | parallel ffmpeg -y -hide_banner -i {} -ac 1 -ar 16000 -f s16le -acodec pcm_s16le {.}.raw
|
37 |
+
- ls tests/data | grep -v '\.raw$' | xargs -I {} rm -rf tests/data/{}
|
flake.nix
CHANGED
@@ -21,6 +21,7 @@
|
|
21 |
ffmpeg-full
|
22 |
go-task
|
23 |
lsyncd
|
|
|
24 |
poetry
|
25 |
pre-commit
|
26 |
pv
|
|
|
21 |
ffmpeg-full
|
22 |
go-task
|
23 |
lsyncd
|
24 |
+
parallel
|
25 |
poetry
|
26 |
pre-commit
|
27 |
pv
|