Download scripts/statewide_setup.sh from -1/Brigalow-QLD-v1: direct link, hf CLI and curl.
- Browser
- Download file 1.32 kB
-
https://huggingface.co/-1/Brigalow-QLD-v1/resolve/main/scripts/statewide_setup.sh
- Command line
-
hf download hf://-1/Brigalow-QLD-v1/scripts/statewide_setup.sh
-
curl -L -o statewide_setup.sh https://huggingface.co/-1/Brigalow-QLD-v1/resolve/main/scripts/statewide_setup.sh
1.32 kB
| # Set up the statewide tile pipeline on a fresh Ubuntu container that already has PyTorch (+CUDA), e.g. a rented GPU | |
| # container from a "pytorch" image. Usage (as root on the box, repo copied to /root/clearing-qld): | |
| # bash scripts/statewide_setup.sh # installs GDAL-bundled wheels, checks Earth Search + GPU | |
| set -euo pipefail | |
| cd "$(dirname "$0")/.." | |
| PY=${PY:-python3} | |
| $PY -m pip install -q --upgrade pip | |
| # rasterio wheels bundle GDAL (no system GDAL needed). Torch is NOT installed here: use the container's. | |
| $PY -m pip install -q "numpy>=1.26,<3" "pandas>=2.1,<3" "pyarrow>=15" "rasterio>=1.4.3" "pyproj>=3.6" "shapely>=2.0" \ | |
| "geopandas>=1.0,<2" "requests>=2.31" "pillow>=10" "scipy>=1.11" "lightgbm==4.6.0" | |
| export PYTHONPATH=$PWD/src | |
| $PY - <<'PY' | |
| import torch, rasterio, time, os | |
| os.environ["AWS_NO_SIGN_REQUEST"] = "YES" | |
| print("torch", torch.__version__, "cuda", torch.cuda.is_available(), torch.cuda.get_device_name(0) if torch.cuda.is_available() else "") | |
| print("rasterio", rasterio.__version__, "gdal", rasterio.__gdal_version__, "cpus", os.cpu_count()) | |
| from brigalow.statewide import tile_items | |
| t = time.time(); it = tile_items("55KCB", "2024-07-01", "2024-07-31") | |
| print(f"earth search ok: {len(it)} items for 55KCB Jul 2024 in {time.time()-t:.1f}s") | |
| PY | |
| echo "setup ok" | |