Closed agorman closed 1 year ago
Thanks, that's a good suggestion. Indeed a lot of useless things can get installed when running on CPU only.
Concerning the recently added requirements you point, onnxruntime
and torchaudio
are needed when using the --vad
option (VAD is not by default).
Maybe I should put them in the "extras_require" of the setup, but I find this a bit awkward.
Hmm, I have to think.
Actually, I did some tests, and there is no need to modify whisper-timestamped. You can just run this before installing the rest as usual:
pip install \
torch==1.13.1+cpu \
torchaudio==0.13.1+cpu \
-f https://download.pytorch.org/whl/torch_stable.html
By doing this, I can indeed build a docker image of 3.42GB instead of 8.84GB.
I'll add a note in the README, and maybe another Dockerfile.
Thanks again
Actually, this gives an error:
ERROR: Could not find a version that satisfies the requirement torch==1.13.1+cpu (from versions: 2.0.0, 2.0.0+cpu, 2.0.0+cu117, 2.0.0+cu118, 2.0.1, 2.0.1+cpu, 2.0.1+cu117, 2.0.1+cu118)
Is there a way to install whisper-timestamped with only dependencies required for CPU processing?
This change to requirements adds some very large packages as dependencies that don't appear to be required when not using GPU. I'm avoiding this now by doing the following.
Install whisper avoiding GPU deps
Install whisper-timestamped avoiding GPU deps
This isn't a great solution for whisper-timestamped because if you add other needed dependencies to requirements.txt it will fail.