Datasets:
Download runpod/setup_runpod.sh from datamatters24/research-document-archive: direct link, hf CLI and curl.
- Browser
- Download file 840 Bytes
-
https://huggingface.co/datasets/datamatters24/research-document-archive/resolve/c25f815155022443c685329cfebd229cd6653ee2/runpod/setup_runpod.sh
- Command line
-
hf download hf://datasets/datamatters24/research-document-archive@c25f815155022443c685329cfebd229cd6653ee2/runpod/setup_runpod.sh
-
curl -L -o setup_runpod.sh https://huggingface.co/datasets/datamatters24/research-document-archive/resolve/c25f815155022443c685329cfebd229cd6653ee2/runpod/setup_runpod.sh
840 Bytes
| # Run this on RunPod after uploading embeddings.npz and doc_metadata.jsonl | |
| # Sets up the environment and runs BERTopic clustering | |
| echo "=== RunPod BERTopic Setup ===" | |
| echo "GPU info:" | |
| nvidia-smi --query-gpu=name,memory.total --format=csv,noheader | |
| # Install dependencies | |
| pip install --upgrade pip | |
| pip install bertopic hdbscan umap-learn plotly safetensors | |
| # Try to install cuML for GPU acceleration | |
| # This depends on the CUDA version on the pod | |
| echo "" | |
| echo "Attempting cuML install for GPU-accelerated UMAP/HDBSCAN..." | |
| pip install cuml-cu12 2>/dev/null || \ | |
| pip install cuml-cu11 2>/dev/null || \ | |
| echo "cuML not available — will use CPU UMAP/HDBSCAN (slower but works)" | |
| echo "" | |
| echo "=== Setup complete ===" | |
| echo "Run: python 02_bertopic_gpu.py" | |
| echo "Or with nohup: nohup python 02_bertopic_gpu.py > bertopic.log 2>&1 &" | |