|
| 1 | +# SAM 3D Objects - Cluster Setup Notes |
| 2 | + |
| 3 | +This document captures the findings and a complete setup flow for `sam-3d-objects` on this Slurm cluster using mamba. |
| 4 | + |
| 5 | +## Repository Location |
| 6 | + |
| 7 | +- Repo path: `$REPO_ROOT` |
| 8 | + |
| 9 | +## Prerequisites (from `doc/setup.md`) |
| 10 | + |
| 11 | +- Linux 64-bit (mamba platform `linux-64`). |
| 12 | +- NVIDIA GPU with at least 32 GB VRAM. |
| 13 | +- Build on a GPU node to avoid PyTorch3D "Not compiled with GPU support" errors. |
| 14 | + |
| 15 | +## Slurm Findings |
| 16 | + |
| 17 | +Partitions observed: |
| 18 | + |
| 19 | +- `defq` (nodes `gpu01-08`) |
| 20 | +- `a6000` (node `gpu09`) |
| 21 | + |
| 22 | +GPU resources for `a6000`: |
| 23 | + |
| 24 | +- `gpu09` has `gres=gpu:4` and is in partition `a6000`. |
| 25 | +- Use this partition to satisfy the >= 32 GB VRAM requirement (A6000 is typically 48 GB). |
| 26 | + |
| 27 | +## Recommended Interactive Allocation |
| 28 | + |
| 29 | +``` |
| 30 | +salloc -p a6000 --gres=gpu:1 --cpus-per-task=8 --mem=32G --time=02:00:00 |
| 31 | +srun --pty bash |
| 32 | +``` |
| 33 | + |
| 34 | +## Environment Setup (mamba) |
| 35 | + |
| 36 | +From `doc/setup.md`: |
| 37 | + |
| 38 | +``` |
| 39 | +cd $REPO_ROOT |
| 40 | +
|
| 41 | +mamba env create -f environments/default.yml |
| 42 | +mamba activate sam3d-objects |
| 43 | +
|
| 44 | +export PIP_EXTRA_INDEX_URL="https://pypi.ngc.nvidia.com https://download.pytorch.org/whl/cu121" |
| 45 | +pip install -e '.[dev]' |
| 46 | +pip install -e '.[p3d]' |
| 47 | +
|
| 48 | +export PIP_FIND_LINKS="https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.5.1_cu121.html" |
| 49 | +pip install -e '.[inference]' |
| 50 | +
|
| 51 | +./patching/hydra |
| 52 | +``` |
| 53 | + |
| 54 | +## GPU and Platform Verification |
| 55 | + |
| 56 | +``` |
| 57 | +nvidia-smi |
| 58 | +mamba info | rg "platform|platforms" |
| 59 | +``` |
| 60 | + |
| 61 | +Expected: |
| 62 | + |
| 63 | +- GPU present and visible in `nvidia-smi`. |
| 64 | +- `platform : linux-64` in `mamba info`. |
| 65 | + |
| 66 | +## Hugging Face Checkpoints |
| 67 | + |
| 68 | +Access required for `facebook/sam-3d-objects`. |
| 69 | + |
| 70 | +``` |
| 71 | +pip install 'huggingface-hub[cli]<1.0' |
| 72 | +hf auth login |
| 73 | +
|
| 74 | +TAG=hf |
| 75 | +hf download \ |
| 76 | + --repo-type model \ |
| 77 | + --local-dir checkpoints/${TAG}-download \ |
| 78 | + --max-workers 1 \ |
| 79 | + facebook/sam-3d-objects |
| 80 | +mv checkpoints/${TAG}-download/checkpoints checkpoints/${TAG} |
| 81 | +rm -rf checkpoints/${TAG}-download |
| 82 | +``` |
| 83 | + |
| 84 | +## Sanity Check (CUDA) |
| 85 | + |
| 86 | +``` |
| 87 | +python - <<'PY' |
| 88 | +import torch |
| 89 | +print("cuda:", torch.cuda.is_available()) |
| 90 | +if torch.cuda.is_available(): |
| 91 | + print(torch.cuda.get_device_name(0)) |
| 92 | +PY |
| 93 | +``` |
0 commit comments