Spaces:
Running
on
T4
Setup does not work
I followed the read me file (https://huggingface.co./spaces/facebook/seamless-streaming/blob/main/README.md) and then when I ran:
uvicorn app_pubsub:app --reload --host localhost
I got this error:
ImportError: this version of pandas is incompatible with numpy < 1.20.3
your numpy version is 1.18.5.
Please upgrade numpy to >= 1.20.3 to use this pandas version
So I did pip install numpy==1.20.3 which gave this error:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
fairseq2 0.2.1 requires numpy~=1.23, but you have numpy 1.20.3 which is incompatible.
numba 0.58.1 requires numpy<1.27,>=1.22, but you have numpy 1.20.3 which is incompatible.
sonar-space 0.2.1 requires numpy>=1.21, but you have numpy 1.20.3 which is incompatible.
So I did pip install numpy==1.23 and ran uvicorn app_pubsub:app --reload --host localhost again. I got this error:
OSError: /home/devmehta/miniconda3/envs/smlss_server/lib/python3.8/site-packages/torchaudio/lib/libtorchaudio.so: undefined symbol: _ZNK3c105Error4whatEv
To solve this, I ran this command as suggested by someone:
conda install pytorch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 pytorch-cuda=12.1 -c pytorch -c nvidia
and tried running uvicorn app_pubsub:app --reload --host localhost again but got another error:
ImportError: /home/devmehta/miniconda3/envs/smlss_server/lib/python3.8/site-packages/fairseq2n/lib/libfairseq2n.so.0: undefined symbol: _ZN2at4_ops8new_full4callERKNS_6TensorEN3c108ArrayRefINS5_6SymIntEEERKNS5_6ScalarESt8optionalINS5_10ScalarTypeEESC_INS5_6LayoutEESC_INS5_6DeviceEESC_IbE
Yes because if you look at Dockerfile, you will see they have specific CUDA version, and also specific FairSeq2 version.
For CUDA 12.1 you want, update this in Dockerfile:
FROM nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04 as backend
pip install fairseq2 --pre --extra-index-url https://fair.pkg.atmeta.com/fairseq2/whl/nightly/pt2.1.1/cu121
They originally use CUDA 11.8
The error you see from file "libfairseq2n.so", in general in Linux *.so is precompiled shared library in C++ so it needs to link against same external library it was precompiled for. In Windows it would be *.dll as dynamic library. So everytime you see some error about *.so files in Linux, it means it is compiled against different version of some dependency. What dependency, that is something you need to find and fix.
and don't forget to run docker like this to expose NVIDIA GPU from OS and map port:docker run --gpus all -it -p 7860:7860 seamless-streaming:latest