Konuktor92's picture
Add full training code for model v1 (same files as PR #1)
7e6579d verified
Raw History Blame Contribute Delete
1.11 kB
#!/usr/bin/env bash
# One-time environment setup on the Vast box (CUDA 12 PyTorch image, /opt/conda Python 3.11).
set -euo pipefail
echo "SETUP_START $(date -u +%FT%TZ)"
python -m pip install -q --upgrade pip
python -m pip install -q \
rasterio rioxarray xarray h5netcdf netCDF4 h5py \
geopandas shapely pyproj pyarrow polars pandas requests tqdm \
earthaccess xgboost lightgbm scikit-learn optuna shap \
pymannkendall statsmodels huggingface_hub pytest
python -m pip freeze > /root/requirements.lock
python - <<'PY'
import numpy as np, rasterio, xarray, geopandas, earthaccess, xgboost, lightgbm, sklearn
import optuna, shap, pymannkendall, statsmodels, huggingface_hub, h5py, netCDF4, polars
print("rasterio", rasterio.__version__, "| GDAL", rasterio.__gdal_version__)
print("xgboost", xgboost.__version__, "| lightgbm", lightgbm.__version__, "| earthaccess", earthaccess.__version__)
from xgboost import XGBRegressor
X = np.random.rand(2000, 5); y = X.sum(1)
XGBRegressor(n_estimators=20, tree_method="hist", device="cuda").fit(X, y)
print("XGBOOST_CUDA_OK")
PY
echo "SETUP_DONE $(date -u +%FT%TZ)"