Files
radiacode/docker-compose.yml
Jacquin Antoine 1e0c1a5ea5 Dashboard web FastAPI + Chart.js
- 4 vues : spectre temps reel, historique detections, background, timeline CPS
- API REST : /api/status, /api/spectrum/current, /api/spectrum/difference,
  /api/background, /api/background/spectrum, /api/history, /api/cps/timeline
- Frontend vanilla JS + Chart.js (pas de Node.js, leger pour Pi 4)
- Moniteur modifie pour exporter son etat dans /data/monitor_state.json
  et le CPS dans /data/cps_log.jsonl chaque cycle
- Nouveau conteneur Docker 'web' sur port 8080
- Theme sombre, calibration energie (E = 0.33 + 2.97 * canal)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-19 13:33:07 +02:00

78 lines
2.0 KiB
YAML

services:
train:
build:
context: ./train
dockerfile: Dockerfile
volumes:
- ./data:/data
- ./models:/models
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
environment:
- NVIDIA_VISIBLE_DEVICES=1
- CUDA_VISIBLE_DEVICES=1
- DATA_DIR=/data/synthetic
- MODEL_DIR=/models
- NUM_SAMPLES=50000
- EPOCHS=100
- BATCH_SIZE=64
- LEARNING_RATE=0.001
- DETECTOR=radiacode_103
- MIN_DURATION=43200
- MAX_DURATION=86400
- SEED=42
detect:
build:
context: ./detect
dockerfile: Dockerfile
volumes:
- ./models:/models:ro
- ./logs:/logs
- ./data:/data
devices:
- /dev/bus/usb:/dev/bus/usb
privileged: true
environment:
- MODEL_PATH=/models/vega_best.pt
- ISOTOPE_INDEX_PATH=/models/vega_isotope_index.txt
- BACKGROUND_PATH=/data/background_24h.npy
- STATE_PATH=/data/monitor_state.json
- CPS_LOG_PATH=/data/cps_log.jsonl
- VEGA_ML_PATH=/models/vega_ml
- VEGA_DEVICE=cpu
- LOG_DIR=/logs
- SAMPLE_INTERVAL=60
- REPORT_HOUR=0
- MIN_LIVE_TIME=3600
- THRESHOLD=0.5
depends_on:
train:
condition: service_completed_successfully
restart: unless-stopped
web:
build:
context: ./web
dockerfile: Dockerfile
ports:
- "8080:8080"
volumes:
- ./data:/data:ro
- ./logs:/logs:ro
- ./models/vega_isotope_index.txt:/models/vega_isotope_index.txt:ro
environment:
- STATE_PATH=/data/monitor_state.json
- CPS_LOG_PATH=/data/cps_log.jsonl
- BACKGROUND_PATH=/data/background_24h.npy
- BACKGROUND_SNAPSHOT_PATH=/data/background_snapshot.json
- LOG_DIR=/logs
- ISOTOPE_INDEX_PATH=/models/vega_isotope_index.txt
- ENERGY_CALIBRATION_OFFSET=0.33
- ENERGY_CALIBRATION_SLOPE=2.97
restart: unless-stopped