- webapp.py: FastAPI serving the continuous map (port 8973) with /api/preview, /api/generate and /api/status; tiles are downloaded from IGN and processed in a logged subprocess, tracked live in a side "File de génération" panel that survives page reloads - fetch_ign.py: download missing 1 km LiDAR HD tiles from the IGN geoplateforme before processing - index.py: tile thumbnails and 500 m subtiles are now invalidated by mtime so regenerating a tile refreshes its cached images; progress logging per tile - dtm.py: back to the historical gap handling (small gaps filled by fillnodata only, larger holes left as nodata rendered black); lowest-return floor only via --bare-earth, IGN class selection via --ign-classes - cli.py: positional input now optional (--rebuild-index works alone) - docker-compose.yml: serve (GPU, port 8973) and process services; launch via docker compose only (documented in AGENTS.md/AGENTS.md) - tests: 131 passing, incl. regressions for thumbnail staleness, --rebuild-index without input, and nodata rendering
70 lines
2.2 KiB
YAML
70 lines
2.2 KiB
YAML
# Lancement du pipeline LiDAR — TOUJOURS via docker compose :
|
|
# docker compose build # après chaque édition de code (code baké dans l'image)
|
|
# docker compose up -d serve # carte interactive + API sur http://localhost:8973
|
|
# docker compose logs -f serve # journal du serveur
|
|
# docker compose down # arrêt
|
|
# Traitement ponctuel (sans serveur) :
|
|
# docker compose run --rm process [-r 0.5,0.2 | --force | --file ...]
|
|
# Jupyter (opt-in) :
|
|
# docker compose --profile interactive up -d jupyter
|
|
|
|
services:
|
|
# Carte interactive + API de génération (mode ./run.sh --serve)
|
|
serve:
|
|
build: .
|
|
image: lidar-lidar
|
|
container_name: lidar-serve
|
|
init: true
|
|
user: "1000:1000"
|
|
gpus: all
|
|
ports:
|
|
- "8973:8973"
|
|
volumes:
|
|
# input/ en écriture : l'API y télécharge les dalles IGN manquantes
|
|
- ./input:/data/input
|
|
- ./output:/data/output
|
|
environment:
|
|
- TZ=Europe/Paris
|
|
- LIDAR_INPUT_DIR=/data/input
|
|
- LIDAR_OUTPUT_DIR=/data/output
|
|
# Les générations lancées depuis la carte utilisent le GPU
|
|
- LIDAR_GPU=1
|
|
- LIDAR_WORKERS=2
|
|
command: python3 -m uvicorn lidar_pipeline.webapp:app --host 0.0.0.0 --port 8973
|
|
restart: unless-stopped
|
|
|
|
# Traitement ponctuel des dalles input/ (une passe puis arrêt)
|
|
process:
|
|
build: .
|
|
image: lidar-lidar
|
|
container_name: lidar-process
|
|
init: true
|
|
user: "1000:1000"
|
|
gpus: all
|
|
volumes:
|
|
- ./input:/data/input
|
|
- ./output:/data/output
|
|
environment:
|
|
- TZ=Europe/Paris
|
|
command: ["python3", "-m", "lidar_pipeline", "/data/input", "-o", "/data/output", "-r", "0.5,0.2", "-g", "all"]
|
|
profiles:
|
|
- process
|
|
|
|
# Exploration interactive (opt-in : --profile interactive)
|
|
jupyter:
|
|
build: .
|
|
image: lidar-lidar
|
|
container_name: lidar-jupyter
|
|
init: true
|
|
ports:
|
|
- "8888:8888"
|
|
volumes:
|
|
- ./input:/data/input
|
|
- ./output:/data/output
|
|
- ./notebooks:/workspace
|
|
command: >
|
|
bash -c "pip install jupyter && \
|
|
jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser --allow-root --NotebookApp.token=''"
|
|
profiles:
|
|
- interactive
|