From ef9a6a2e665703a39532937d0f6477c20762524c Mon Sep 17 00:00:00 2001 From: Gokul Mohanarangan Date: Tue, 25 Jul 2023 13:47:23 +0530 Subject: [PATCH] separate requirements --- requirements.txt => pipeline-requirements.txt | 5 -- scripts/setup_dependencies.sh | 31 +----------- scripts/setup_pipeline_dependencies.sh | 33 ++++++++++++ server-requirements.txt | 50 +++++++++++++++++++ 4 files changed, 84 insertions(+), 35 deletions(-) rename requirements.txt => pipeline-requirements.txt (91%) create mode 100644 scripts/setup_pipeline_dependencies.sh create mode 100644 server-requirements.txt diff --git a/requirements.txt b/pipeline-requirements.txt similarity index 91% rename from requirements.txt rename to pipeline-requirements.txt index fb69c4bd..24e7a092 100644 --- a/requirements.txt +++ b/pipeline-requirements.txt @@ -2,8 +2,6 @@ pyaudio==0.2.13 keyboard==0.13.5 pynput==1.7.6 wave==0.0.2 -aiohttp==3.8.4 -aiosignal==1.3.1 async-timeout==4.0.2 attrs==23.1.0 certifi==2023.5.7 @@ -51,11 +49,8 @@ matplotlib==3.7.2 matplotlib-inline==0.1.6 termcolor==2.3.0 ffmpeg==1.4 -aiortc==1.5.0 cached_property==1.5.2 stamina==23.1.0 httpx==0.24.1 -sortedcontainers==2.4.0 https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz gpt4all==1.0.5 -aiohttp_cors==0.7.0 diff --git a/scripts/setup_dependencies.sh b/scripts/setup_dependencies.sh index b7dc6d77..50288d54 100755 --- a/scripts/setup_dependencies.sh +++ b/scripts/setup_dependencies.sh @@ -1,33 +1,4 @@ #!/bin/sh -# Upgrade pip pip install --upgrade pip - -# Default to CPU Installation of JAX -jax_mode="jax[cpu]" - -# Install JAX -if [ "$1" == "cpu" ] -then - jax_mode="jax[cpu]" -elif [ "$1" == "cuda11" ] -then - jax_mode="jax[cuda11_pip]" -elif [ "$1" == "cuda12" ] -then - jax_mode="jax[cuda12_pip]" -fi - -pip install --upgrade "$jax_mode" - -# Install Whisper-JAX base -pip install git+https://github.com/sanchit-gandhi/whisper-jax.git - -# Update to latest version -pip install --upgrade --no-deps --force-reinstall git+https://github.com/sanchit-gandhi/whisper-jax.git - -pip install -r ../requirements.txt - -# download spacy models -spacy download en_core_web_sm -spacy download en_core_web_md +pip install -r ../server-requirements.txt \ No newline at end of file diff --git a/scripts/setup_pipeline_dependencies.sh b/scripts/setup_pipeline_dependencies.sh new file mode 100644 index 00000000..95d5d41d --- /dev/null +++ b/scripts/setup_pipeline_dependencies.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +# Upgrade pip +pip install --upgrade pip + +# Default to CPU Installation of JAX +jax_mode="jax[cpu]" + +# Install JAX +if [ "$1" == "cpu" ] +then + jax_mode="jax[cpu]" +elif [ "$1" == "cuda11" ] +then + jax_mode="jax[cuda11_pip]" +elif [ "$1" == "cuda12" ] +then + jax_mode="jax[cuda12_pip]" +fi + +pip install --upgrade "$jax_mode" + +# Install Whisper-JAX base +pip install git+https://github.com/sanchit-gandhi/whisper-jax.git + +# Update to latest version +pip install --upgrade --no-deps --force-reinstall git+https://github.com/sanchit-gandhi/whisper-jax.git + +pip install -r ../server-requirements.txt + +# download spacy models +spacy download en_core_web_sm +spacy download en_core_web_md diff --git a/server-requirements.txt b/server-requirements.txt new file mode 100644 index 00000000..01d7af38 --- /dev/null +++ b/server-requirements.txt @@ -0,0 +1,50 @@ +aiohttp==3.8.5 +aiohttp-cors==0.7.0 +aioice==0.9.0 +aiortc==1.5.0 +aiosignal==1.3.1 +anyio==3.7.1 +async-timeout==4.0.2 +attrs==23.1.0 +av==10.0.0 +certifi==2023.7.22 +cffi==1.15.1 +charset-normalizer==3.2.0 +coloredlogs==15.0.1 +cryptography==41.0.2 +ctranslate2==3.17.1 +dnspython==2.4.0 +faster-whisper==0.7.1 +filelock==3.12.2 +flatbuffers==23.5.26 +frozenlist==1.4.0 +fsspec==2023.6.0 +google-crc32c==1.5.0 +h11==0.14.0 +httpcore==0.17.3 +huggingface-hub==0.16.4 +humanfriendly==10.0 +idna==3.4 +ifaddr==0.2.0 +loguru==0.7.0 +mpmath==1.3.0 +multidict==6.0.4 +numpy==1.25.1 +onnxruntime==1.15.1 +packaging==23.1 +protobuf==4.23.4 +pycparser==2.21 +pyee==11.0.0 +pylibsrtp==0.8.0 +pyOpenSSL==23.2.0 +PyYAML==6.0.1 +requests==2.31.0 +sniffio==1.3.0 +sortedcontainers==2.4.0 +sympy==1.12 +tokenizers==0.13.3 +tqdm==4.65.0 +typing_extensions==4.7.1 +urllib3==2.0.4 +yarl==1.9.2 +wave==0.0.2