Split the unattended run into a GPU-free phase and a GPU phase
The target machine's card is busy with someone else's job, so a single end-to-end script stalls on work that does not actually need a GPU. Compiling the CUDA extensions needs nvcc, not a device, and downloading 18 GB of data needs neither. Those are the slow parts (~50 min + ~30 min), so phase A now runs entirely without the card: run_setup.sh bootstrap, conda, extensions, patches, data no GPU run_train.sh voxel_max measurement, training, evaluation GPU run_setup reports the GPU but never fails on it, and verify_env.py gained SKIP_CUDA_CHECK so import coverage still runs when no device is visible. TORCH_CUDA_ARCH_LIST is stated rather than probed, since the card may be unavailable at build time. run_train waits for the GPU instead of failing when it is busy: it polls until enough VRAM frees up (12h default), so it can be queued ahead of time. Past the deadline it proceeds anyway and lets the measured voxel_max adapt to whatever is actually free. keepalive.sh now takes the phase to supervise. Replaces run_all.sh and RUN.md with SETUP.md and TRAIN.md. Adds selfcheck.sh, which syntax-checks every script and flags CRLF endings - a shell script with either fails at its first line, which for an unattended weekend run means losing the weekend. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,46 +5,62 @@
|
||||
|
||||
대상 데이터: 서산 명천 도로 프로젝트 — ContextCapture OBJ 6블록, EPSG:5186.
|
||||
|
||||
## 이 레포에 있는 것
|
||||
## 문서
|
||||
|
||||
| 경로 | 내용 |
|
||||
|---|---|
|
||||
| [RUN.md](RUN.md) | **무인 실행 — 명령 하나로 학습까지. 여기부터** |
|
||||
| [SETUP.md](SETUP.md) | 단계별 수동 실행 (문제 생겼을 때 확인용) |
|
||||
| [docs/pipeline.html](docs/pipeline.html) | 6단계 공정 정의 (브라우저로 열 것) |
|
||||
| [SETUP.md](SETUP.md) | **1단계 — 환경 구축 (GPU 불필요). 여기부터** |
|
||||
| [TRAIN.md](TRAIN.md) | 2단계 — 학습 (GPU 필요) |
|
||||
| [docs/pipeline.html](docs/pipeline.html) | 전체 6단계 공정 정의 (브라우저로 열 것) |
|
||||
| [docs/SUM-Parts-검토노트.md](docs/SUM-Parts-검토노트.md) | 트러블슈팅 16건, 데이터 스키마 실측, 라이선스 |
|
||||
| [scripts/](scripts/) | 환경 구축 · 학습 · 평가 · 변환 스크립트 47개 |
|
||||
| [scripts/](scripts/) | 환경 구축 · 학습 · 평가 · 변환 스크립트 |
|
||||
|
||||
데이터와 체크포인트는 커밋하지 않는다(`.gitignore`). 스크립트로 재생성한다.
|
||||
|
||||
## 요약
|
||||
## 왜 두 단계로 나눴나
|
||||
|
||||
- **모델**: PointVector (논문 mIoU 70.0%, 번들 최고이자 최속)
|
||||
- **학습 자산**: SUM Parts face 트랙 13클래스 → 우리 4클래스로 통합
|
||||
- **제약**: 저자가 학습 가중치를 공개하지 않아 직접 학습이 유일한 경로
|
||||
- **VRAM**: 논문 설정 `voxel_max 64000`은 16.5GB 필요 → 12GB 카드 불가, 24GB 필요
|
||||
CUDA 확장 빌드는 **`nvcc` 컴파일이지 GPU 실행이 아니다.** 데이터 다운로드도 마찬가지다.
|
||||
오래 걸리는 작업(빌드 50분 + 데이터 30분)이 전부 GPU 없이 되므로,
|
||||
카드가 남의 작업에 물려 있어도 1단계를 미리 끝낼 수 있다.
|
||||
|
||||
| | GPU | 시간 |
|
||||
|---|---|---|
|
||||
| 1단계 · 환경 구축 | 불필요 | ~80분 |
|
||||
| 2단계 · 학습·평가 | 필요 | 3~6시간 |
|
||||
|
||||
2단계는 카드가 바쁘면 **실패하지 않고 빌 때까지 기다린다.**
|
||||
|
||||
## 빠른 시작 (무인)
|
||||
|
||||
```bash
|
||||
# 1. HF 토큰 (게이트는 계정 단위 — 이미 수락한 계정 토큰을 복사)
|
||||
# HF 토큰 — 유일한 수동 작업. 게이트는 계정 단위라 토큰만 옮기면 된다
|
||||
mkdir -p ~/.cache/huggingface && echo hf_xxxxx > ~/.cache/huggingface/token
|
||||
|
||||
# 2. 사전점검 — OK 안 나오면 여기서 해결하고 갈 것
|
||||
bash scripts/test_preflight.sh
|
||||
# 1단계 — GPU 불필요
|
||||
bash scripts/selfcheck.sh # 스크립트 무결성
|
||||
RUN_DRYRUN=1 bash scripts/run_setup.sh # 전제조건 검사
|
||||
setsid nohup bash scripts/keepalive.sh setup > ~/keepalive-setup.out 2>&1 &
|
||||
|
||||
# 3. 실행. 베어 머신 → 학습 완료까지 5~8시간, 멈춰도 이어간다
|
||||
setsid nohup bash scripts/keepalive.sh > ~/keepalive.out 2>&1 &
|
||||
# 2단계 — GPU 필요. 바쁘면 빌 때까지 대기
|
||||
setsid nohup bash scripts/keepalive.sh train > ~/keepalive-train.out 2>&1 &
|
||||
```
|
||||
|
||||
확인:
|
||||
|
||||
```bash
|
||||
cat ~/sum-parts/runs/run_all/STATUS
|
||||
cat ~/sum-parts/runs/coarse_eval/coarse.txt # 4클래스 통합 성적
|
||||
cat ~/sum-parts/runs/setup/STATUS
|
||||
cat ~/sum-parts/runs/train/STATUS
|
||||
cat ~/sum-parts/runs/coarse_eval/coarse.txt # 4클래스 통합 성적 ← 핵심
|
||||
```
|
||||
|
||||
자세한 것은 [RUN.md](RUN.md).
|
||||
멈춰도 이어간다 — 감시자가 재기동하고, 학습은 체크포인트에서 재개한다.
|
||||
|
||||
## 요약
|
||||
|
||||
- **모델**: PointVector (논문 mIoU 70.0 %, 번들 최고이자 최속)
|
||||
- **학습 자산**: SUM Parts face 트랙 13클래스 → 우리 4클래스로 통합
|
||||
- **제약**: 저자가 학습 가중치를 공개하지 않아 직접 학습이 유일한 경로
|
||||
- **VRAM**: 논문 설정 `voxel_max 64000`은 약 16.5 GB 필요 → 12 GB 카드 불가, 24 GB 필요
|
||||
|
||||
## 라이선스
|
||||
|
||||
|
||||
Reference in New Issue
Block a user