Spaces:
Sleeping
Sleeping
Download scripts/install.sh from ciass/protest-segments: direct link, hf CLI and curl.
- Browser
- Download file 859 Bytes
-
https://huggingface.co/spaces/ciass/protest-segments/resolve/main/scripts/install.sh
- Command line
-
hf download hf://spaces/ciass/protest-segments/scripts/install.sh
-
curl -L -o install.sh https://huggingface.co/spaces/ciass/protest-segments/resolve/main/scripts/install.sh
859 Bytes
| echo "Installing dependencies" | |
| # install requirements | |
| pip install --no-cache-dir --upgrade -r ./requirements.txt | |
| # install detectron2 | |
| pip install -e ./modules/detectron2 | |
| # check if cuda is available | |
| cuda=$(python -c "import torch; print(torch.cuda.is_available())") | |
| if [ "$cuda" == "True" ]; then | |
| # install MaskDINO | |
| cd ./modules/MaskDINO | |
| pip install -r requirements.txt | |
| cd maskdino/modeling/pixel_decoder/ops | |
| python setup.py build install --install-lib $HOME/.local/lib/python3.8/site-packages/ | |
| cd ../../../../../../ | |
| # install Detic | |
| cd ./modules/Detic | |
| pip install -r requirements.txt | |
| cd third_party/Deformable-DETR/models/ops | |
| python setup.py build install --install-lib $HOME/.local/lib/python3.8/site-packages/ | |
| cd ../../../../../../ | |
| else | |
| echo "Could not find graphics card... skipping dependencies..." | |
| fi | |