File size: 6,195 Bytes
ca27310 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | # Fathom VM Recovery Guide
This guide matches the live VM state observed on April 9, 2026.
## What is already backed up
HF dataset repo: `umer07/vllm-deployement-backup` (private)
Existing artifact:
- `vllm_deployement_backup_20260409_063205.tar.gz`
That archive contains:
- `/opt/fathom`
- `/root/serve.py`
- `/root/vllm.log`
- `/root/serve.log`
- `/etc/os-release`
This is not enough by itself for full disaster recovery because the live platform also depends on Docker volumes for Neo4j and MinIO. Those stateful volumes must be restored as well.
## Live stack this guide targets
- Host OS: Ubuntu 24.04.3 LTS
- ROCm driver reported by `rocm-smi`: `6.14.14`
- Host-side model process: `/root/serve.py`
- Model API port: `8001`
- Docker app root: `/opt/fathom`
- Backend port: `7860`
- Dashboard port: `3000`
- Neo4j ports: `7474`, `7687`
- MinIO ports: `9000`, `9001`
Observed host Python packages:
- `torch==2.5.1+rocm6.2`
- `transformers==4.44.2`
- `peft==0.18.1`
- `flask==3.1.3`
## Required backup set for full recovery
You need all of the following in the private HF dataset:
- `vllm_deployement_backup_20260409_063205.tar.gz`
- `fathom_minio_data_20260409.tar.gz`
- `fathom_neo4j_data_20260409.tar.gz`
- `fathom_neo4j_logs_20260409.tar.gz`
- This guide
Intentionally not included:
- `fathom_hf_cache`
Reason:
- It is very large and fully reproducible from Hugging Face once `HF_TOKEN` is present.
- Excluding it keeps the recovery bundle much smaller while still allowing a complete rebuild.
## 1. Provision a replacement VM
Use an AMD GPU VM that supports ROCm and matches the current host as closely as possible.
Minimum expectations:
- Ubuntu 24.04
- Docker Engine
- Docker Compose plugin
- Python 3.10+
- ROCm-compatible PyTorch install
## 2. Install base packages
```bash
apt update
apt install -y docker.io docker-compose-v2 python3 python3-pip curl git
systemctl enable docker
systemctl start docker
```
If Docker Compose is not available as `docker compose`, install the Compose plugin separately.
## 3. Install host-side model dependencies
Install ROCm PyTorch first, then the Python packages required by `/root/serve.py`.
```bash
python3 -m pip install --upgrade pip
python3 -m pip install \
torch torchvision torchaudio \
--index-url https://download.pytorch.org/whl/rocm6.2
python3 -m pip install \
transformers==4.44.2 \
peft==0.18.1 \
flask==3.1.3 \
accelerate \
sentencepiece \
safetensors \
huggingface_hub
```
If your ROCm image already ships with PyTorch, verify that `python3 -c "import torch; print(torch.__version__)"` succeeds before replacing it.
## 4. Download the backup files from Hugging Face
Use the private token and download the required files from `umer07/vllm-deployement-backup`.
```bash
python3 - <<'PY'
from huggingface_hub import hf_hub_download
repo_id = "umer07/vllm-deployement-backup"
files = [
"vllm_deployement_backup_20260409_063205.tar.gz",
"fathom_minio_data_20260409.tar.gz",
"fathom_neo4j_data_20260409.tar.gz",
"fathom_neo4j_logs_20260409.tar.gz",
"VM_RECOVERY_GUIDE_20260409.md",
]
for name in files:
path = hf_hub_download(
repo_id=repo_id,
filename=name,
repo_type="dataset",
local_dir=".",
)
print(path)
PY
```
Make sure the Hugging Face token has access to the private dataset.
## 5. Restore the application files
The application backup was created with absolute-style paths. Extract it from `/`.
```bash
cd /
tar -xzf /root/vllm_deployement_backup_20260409_063205.tar.gz
```
After extraction, verify:
- `/opt/fathom/.env`
- `/opt/fathom/docker-compose.yml`
- `/root/serve.py`
## 6. Restore Docker volumes
Create the required Docker volumes:
```bash
docker volume create fathom_neo4j_data
docker volume create fathom_neo4j_logs
docker volume create fathom_minio_data
```
Restore the saved contents into each volume:
```bash
docker run --rm -v fathom_minio_data:/restore -v /root:/backup alpine \
sh -c "cd /restore && tar -xzf /backup/fathom_minio_data_20260409.tar.gz"
docker run --rm -v fathom_neo4j_data:/restore -v /root:/backup alpine \
sh -c "cd /restore && tar -xzf /backup/fathom_neo4j_data_20260409.tar.gz"
docker run --rm -v fathom_neo4j_logs:/restore -v /root:/backup alpine \
sh -c "cd /restore && tar -xzf /backup/fathom_neo4j_logs_20260409.tar.gz"
```
## 7. Start the host-side model server
The current deployment uses `/root/serve.py` directly on the host and listens on port `8001`.
```bash
nohup python3 /root/serve.py > /root/serve.log 2>&1 &
sleep 10
curl http://127.0.0.1:8001/health
```
Expected result:
```json
{"status":"ok","model":"umer07/fathom-mixtral"}
```
The first cold start may take several minutes while model files download.
## 8. Start the Docker stack
```bash
cd /opt/fathom
docker compose up -d --build
docker compose ps
```
Expected services:
- `fathom-backend`
- `fathom-dashboard`
- `fathom-minio`
- `fathom-neo4j`
## 9. Verify the stack
```bash
curl http://127.0.0.1:7860/health
curl http://127.0.0.1:8001/health
curl http://127.0.0.1:3000
```
Optional checks:
```bash
docker compose -f /opt/fathom/docker-compose.yml ps
docker logs fathom-backend --tail 50
docker logs fathom-dashboard --tail 50
docker logs fathom-neo4j --tail 50
docker logs fathom-minio --tail 50
```
## 10. Important notes
- `/opt/fathom/.env` contains live secrets. Keep the dataset private.
- The compose file points the backend at `http://127.0.0.1:8001`.
- The current live host is using `/root/serve.py`, not a systemd `fathom-vllm.service`.
- The Hugging Face cache is excluded on purpose. The replacement VM will repopulate it automatically on first model startup.
- If you want fully offline recovery later, create and store an additional `fathom_hf_cache` volume backup.
## Quick recovery checklist
```bash
# 1. Install Docker + Python
# 2. Install ROCm PyTorch + serve.py dependencies
# 3. Download all backup files from HF
# 4. Extract vllm_deployement_backup_20260409_063205.tar.gz at /
# 5. Recreate and restore Docker volumes
# 6. Start python3 /root/serve.py
# 7. Start docker compose in /opt/fathom
# 8. Verify ports 8001, 7860, 3000, 9000, 7687
```
|