Download code/setup_env.sh from d9993r/CRICKET: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/datasets/d9993r/CRICKET/resolve/main/code/setup_env.sh
- Command line
-
hf download hf://datasets/d9993r/CRICKET/code/setup_env.sh
-
curl -L -o setup_env.sh https://huggingface.co/datasets/d9993r/CRICKET/resolve/main/code/setup_env.sh
1.04 kB
| # Run from the project root (the folder that contains code/): bash code/setup_env.sh | |
| # Your driver is 470 (CUDA 11.4). PyTorch's CUDA 11.8 build runs on it through CUDA | |
| # minor-version compatibility. The default pip wheels (CUDA 12/13) need a newer driver. | |
| set -e | |
| pip install torch==2.7.1 torchvision==0.22.1 --index-url https://download.pytorch.org/whl/cu118 | |
| pip install -r code/requirements.txt | |
| if ! command -v ffmpeg >/dev/null; then | |
| echo "ffmpeg not found. Preferred: sudo apt install ffmpeg (includes the H.264 encoder)" | |
| echo "Without sudo: conda install -y -c conda-forge ffmpeg" | |
| fi | |
| python - <<'PY' | |
| import torch | |
| print("torch", torch.__version__, "| CUDA available:", torch.cuda.is_available()) | |
| if torch.cuda.is_available(): | |
| p = torch.cuda.get_device_properties(0) | |
| print(f"GPU: {p.name}, {p.total_memory/1e9:.1f} GB, compute {p.major}.{p.minor}") | |
| if (p.major, p.minor) < (3, 7): | |
| print("This GPU is too old for current PyTorch - the pipeline will run on CPU automatically.") | |
| PY | |