Refactor pipeline en modules + logging verbose/debug + options CLI
- Découpage du monolithe process_lidar.py (~2750 lignes) en package lidar_pipeline/ avec 9 modules (gpu, dtm, visualizations, ign, rendering, pipeline, cli, __init__, __main__) - Logging configurable: -v (verbose avec timestamps) et --debug (détails internes fichier:ligne) - Option --force pour régénérer tous les fichiers (par défaut skip les WebP existants) - Option --file NOM pour traiter un seul fichier LAZ (tests rapides) - ProcessPoolExecutor avec répertoires temporaires uniques par worker - Suppression du code mort (geomorphons, hillshade_ne, nodata_mask) - Aucun fichier TIFF résiduel après conversion WebP - setup.py pour installation pip, stub process_lidar.py compatible Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
16
Dockerfile
16
Dockerfile
@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
wget \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /data
|
||||
WORKDIR /app
|
||||
|
||||
# Install Python packages via pip
|
||||
COPY requirements.txt .
|
||||
@ -27,12 +27,18 @@ RUN pip3 install --no-cache-dir \
|
||||
scikit-image \
|
||||
scikit-learn \
|
||||
scipy \
|
||||
tqdm
|
||||
tqdm \
|
||||
Pillow
|
||||
|
||||
# Install CuPy for GPU acceleration (optional - will fallback to numpy if not available)
|
||||
RUN pip3 install --no-cache-dir cupy-cuda12x || echo "CuPy not available - GPU acceleration disabled"
|
||||
|
||||
# Copy scripts
|
||||
# Copy and install the pipeline package
|
||||
COPY setup.py .
|
||||
COPY lidar_pipeline/ ./lidar_pipeline/
|
||||
RUN pip3 install --no-cache-dir .
|
||||
|
||||
# Copy backward-compatible entry point
|
||||
COPY process_lidar.py /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/process_lidar.py
|
||||
|
||||
@ -42,8 +48,10 @@ RUN groupadd -g 1000 lidar && \
|
||||
mkdir -p /data/output /data/input && \
|
||||
chown -R lidar:lidar /data /data/output /data/input
|
||||
|
||||
WORKDIR /data
|
||||
|
||||
USER lidar
|
||||
|
||||
VOLUME ["/data"]
|
||||
|
||||
CMD ["python3", "/usr/local/bin/process_lidar.py", "/data/input", "-o", "/data/output"]
|
||||
CMD ["python3", "-m", "lidar_pipeline", "/data/input", "-o", "/data/output"]
|
||||
Reference in New Issue
Block a user