Добавить PLY-загрузку и Docker Web UI с PCL-пайплайном.
PLY читается в FilePointCloudSource, CLI отдаёт геометрию в output JSON, а Docker/FastAPI/Three.js дают веб-запуск пайплайна без конфликта libpq на хосте. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
FROM ubuntu:24.04 AS builder
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
pkg-config \
|
||||
qtbase5-dev \
|
||||
qt5-qmake \
|
||||
qtdeclarative5-dev \
|
||||
libqt5opengl5-dev \
|
||||
libpcl-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
|
||||
RUN mkdir -p build && cd build \
|
||||
&& qmake ../DotsToSirface.pro 'DEFINES+=PCL_ENABLED' \
|
||||
&& make -j"$(nproc)"
|
||||
|
||||
FROM ubuntu:24.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV DOTSTOSIRFACE_BIN=/usr/local/bin/DotsToSirface
|
||||
ENV PIPELINE_CONFIG=/app/docker/default_pipeline.json
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
libqt5core5t64 \
|
||||
libqt5gui5t64 \
|
||||
libqt5widgets5t64 \
|
||||
libqt5opengl5t64 \
|
||||
libqt5qml5 \
|
||||
libqt5quick5 \
|
||||
libqt5quickwidgets5 \
|
||||
libqt5network5t64 \
|
||||
libpcl-common1.14 \
|
||||
libpcl-io1.14 \
|
||||
libpcl-filters1.14 \
|
||||
libpcl-features1.14 \
|
||||
libpcl-kdtree1.14 \
|
||||
libpcl-search1.14 \
|
||||
libpcl-surface1.14 \
|
||||
libgl1 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder /src/build/DotsToSirface /usr/local/bin/DotsToSirface
|
||||
COPY api /app/api
|
||||
COPY web /app/web
|
||||
COPY docker /app/docker
|
||||
COPY presets /app/presets
|
||||
|
||||
WORKDIR /app/api
|
||||
RUN python3 -m venv /opt/venv \
|
||||
&& /opt/venv/bin/pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
ENV PATH="/opt/venv/bin:${PATH}"
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"profile": "desktop_debug",
|
||||
"preprocessPlugins": [
|
||||
"pcl_remove_nan",
|
||||
"pcl_voxel_grid",
|
||||
"pcl_statistical_outlier"
|
||||
],
|
||||
"reconstructionPlugin": "pcl_greedy_triangulation",
|
||||
"stageDefaults": {
|
||||
"pcl_voxel_grid": "leaf=0.03",
|
||||
"pcl_statistical_outlier": "meanK=24,stddev=1.2",
|
||||
"pcl_greedy_triangulation": "searchRadius=0.08,mu=2.5,maxNearest=100,maxSurfaceAngle=0.8"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
services:
|
||||
dotstosirface-web:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
DOTSTOSIRFACE_BIN: /usr/local/bin/DotsToSirface
|
||||
PIPELINE_CONFIG: /app/docker/default_pipeline.json
|
||||
volumes:
|
||||
- ../presets:/app/presets:ro
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
docker compose up --build "$@"
|
||||
Reference in New Issue
Block a user