- MSRM/TPI/roughness/anomalies: revert z-score (x-mean)/std to std normalization x/std to preserve contrast and visibility of linear features (paths, ditches, trenches) - MSRM: adaptive scales based on resolution, archaeological weight combination - TPI: extend from 2 to 4 scales (3m/15m/50m/200m) with weighted combination - Hillshade: 8 directions instead of 4, altitude 35° instead of 30° - LRM: adaptive sigma based on resolution - Openness: doubled radius (100m instead of 50m) - Roughness: multi-scale (3m fine + 15m broad) instead of single 5x5 window - Anomalies: uses MSRM multi-scale relief instead of single LRM 15m - Wavelet: 8 adaptive scales, std normalization, archaeological weights - Remove svf (Sky-View Factor) and local_dominance visualizations - Add AVIF format support (default), quality 98 - Add multi-resolution support (-r 0.5,0.2) - Improve Ctrl+C handling for immediate process termination - Update rendering.py descriptions for all modified visualizations Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
71 lines
1.9 KiB
Docker
71 lines
1.9 KiB
Docker
FROM nvidia/cuda:12.4.0-devel-ubuntu22.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV TZ=Europe/Paris
|
|
|
|
# Install system packages + Miniforge for PDAL >= 2.5 (Ubuntu 22.04 ships PDAL 2.3 which can't read COPC v1.1)
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
gdal-bin \
|
|
python3-gdal \
|
|
python3-pip \
|
|
python3-dev \
|
|
build-essential \
|
|
wget \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& wget -q https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -O /tmp/miniforge.sh \
|
|
&& bash /tmp/miniforge.sh -b -p /opt/conda \
|
|
&& rm /tmp/miniforge.sh \
|
|
&& /opt/conda/bin/conda install -y -c conda-forge pdal \
|
|
&& ln -sf /opt/conda/bin/pdal /usr/local/bin/pdal \
|
|
&& /opt/conda/bin/conda clean -afy
|
|
|
|
WORKDIR /app
|
|
|
|
# Install Python packages via pip
|
|
COPY requirements.txt .
|
|
RUN pip3 install --no-cache-dir \
|
|
numpy \
|
|
matplotlib \
|
|
whitebox \
|
|
rasterio \
|
|
'laspy[lazrs]' \
|
|
lazrs \
|
|
scikit-image \
|
|
scikit-learn \
|
|
scipy \
|
|
tqdm \
|
|
Pillow \
|
|
pytest \
|
|
numba \
|
|
rio-cogeo \
|
|
titiler.core \
|
|
fastapi \
|
|
uvicorn \
|
|
piexif \
|
|
pillow-avif-plugin
|
|
|
|
# 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 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
|
|
|
|
# Create user with uid/gid 1000:1000 and run as that user
|
|
RUN groupadd -g 1000 lidar && \
|
|
useradd -u 1000 -g lidar -m lidar && \
|
|
mkdir -p /data/output /data/input && \
|
|
chown -R lidar:lidar /data /data/output /data/input
|
|
|
|
WORKDIR /data
|
|
|
|
USER lidar
|
|
|
|
VOLUME ["/data"]
|
|
|
|
CMD ["python3", "-m", "lidar_pipeline", "/data/input", "-o", "/data/output"] |