# Running the LiDAR pipeline - ALWAYS through docker compose: # docker compose up -d --build serve # ALWAYS --build: the code is baked into # # the image; without --build the OLD code runs # # (map + XYZ tiles + API on http://localhost:8973) # docker compose logs -f serve # server log # docker compose down # stop # One-off processing (no server) - --build for the same reason: # docker compose run --rm --build process [--force | --file ...] # (any argument replaces the default command: repeat # python3 -m lidar_pipeline /data/input -o /data/output ... in full) # Jupyter (opt-in): # docker compose --profile interactive up -d jupyter services: # Map + XYZ tiles + generation API (./run.sh --serve mode) serve: build: . image: lidar-lidar container_name: lidar-serve init: true user: "1000:1000" gpus: all ports: - "8973:8973" volumes: # input/ writable: the API downloads missing IGN tiles into it - ./input:/data/input - ./output:/data/output environment: - TZ=Europe/Paris - LIDAR_INPUT_DIR=/data/input - LIDAR_OUTPUT_DIR=/data/output - LIDAR_PORT=8973 # Generations started from the map use the GPU - LIDAR_GPU=1 - LIDAR_WORKERS=10 # Processing machine for a remote map (Raspberry Pi): uncomment and set # the same value as LIDAR_REMOTE_TOKEN over there (protects # /api/generate, /api/preview, /api/stop, /api/queue/clear). # - LIDAR_API_TOKEN=change-me # Networks allowed to start generations from the map (default: # localhost + RFC1918 private ranges; comma-separated CIDR list, # empty = allow everything). # - LIDAR_REGEN_CIDR=192.168.1.0/24 command: python3 -m uvicorn lidar_pipeline.mapserve:app --host 0.0.0.0 --port 8973 restart: unless-stopped # One-off processing of the input/ tiles (one pass, then exit) 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.2", "-g", "all"] profiles: - process # Interactive exploration (opt-in: --profile interactive) jupyter: build: . image: lidar-lidar container_name: lidar-jupyter init: true user: "1000:1000" ports: - "8888:8888" volumes: - ./input:/data/input:ro # exploration only: no writes to input/ - ./output:/data/output - ./notebooks:/workspace # No empty token: Jupyter generates one and prints it (login URL) in # `docker compose logs jupyter` - port 8888 stays protected. command: > bash -c "pip install --user jupyter && \ python3 -m notebook --ip=0.0.0.0 --port=8888 --no-browser \ --notebook-dir=/workspace" profiles: - interactive