feat: Dockerfile BlueOS, deploy_pi.sh rsync, camera_mount.scad baseline 110mm
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
82
Dockerfile
Normal file
82
Dockerfile
Normal file
@@ -0,0 +1,82 @@
|
||||
# SLAM Stéréo BlueOS — Extension Docker
|
||||
# Base: ROS2 Humble (Ubuntu 22.04)
|
||||
# ORB-SLAM3 + Flask interface
|
||||
|
||||
FROM ros:humble-ros-base AS base
|
||||
|
||||
LABEL version="0.1.0"
|
||||
LABEL description="SLAM Stéréo visuel pour AUV sous-marin — BlueOS Extension"
|
||||
LABEL authors='[{"name": "Baptiste Moulin", "email": "claude@nowyouknow.fr"}]'
|
||||
LABEL company='{"about": "AUV SLAM project", "name": "Baptiste Moulin", "email": "claude@nowyouknow.fr"}'
|
||||
LABEL type="device-integration"
|
||||
LABEL tags='["slam", "stereo", "vision", "auv", "underwater"]'
|
||||
LABEL permissions='{"NetworkMode": "host", "Devices": ["/dev/video0", "/dev/video1"], "HostConfig": {"Privileged": false}}'
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV ROS_DISTRO=humble
|
||||
|
||||
# --- Dépendances système ---
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
python3-pip \
|
||||
python3-opencv \
|
||||
libopencv-dev \
|
||||
cmake \
|
||||
build-essential \
|
||||
git \
|
||||
wget \
|
||||
libssl-dev \
|
||||
libusb-1.0-0-dev \
|
||||
libeigen3-dev \
|
||||
libglew-dev \
|
||||
libpython3-dev \
|
||||
python3-numpy \
|
||||
python3-yaml \
|
||||
# Pangolin deps
|
||||
libgl1-mesa-dev \
|
||||
libglu1-mesa-dev \
|
||||
freeglut3-dev \
|
||||
libwayland-dev \
|
||||
libxkbcommon-dev \
|
||||
wayland-protocols \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# --- Python dependencies ---
|
||||
RUN pip3 install --no-cache-dir \
|
||||
flask>=3.0 \
|
||||
numpy>=1.24 \
|
||||
pyyaml>=6.0 \
|
||||
opencv-python-headless>=4.8
|
||||
|
||||
# --- Pangolin (viewer 3D ORB-SLAM3) ---
|
||||
RUN git clone --depth 1 https://github.com/stevenlovegrove/Pangolin /opt/Pangolin && \
|
||||
cmake -S /opt/Pangolin -B /opt/Pangolin/build \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_TOOLS=OFF \
|
||||
-DBUILD_EXAMPLES=OFF && \
|
||||
cmake --build /opt/Pangolin/build --parallel $(nproc) && \
|
||||
cmake --install /opt/Pangolin/build && \
|
||||
rm -rf /opt/Pangolin
|
||||
|
||||
# --- ORB-SLAM3 dependencies (g2o, DBoW2 inclus dans ORB-SLAM3) ---
|
||||
# Note: compilation complète ~15 min. Décommenter pour build final.
|
||||
# RUN git clone --depth 1 https://github.com/UZ-SLAMLab/ORB_SLAM3 /opt/ORB_SLAM3 && \
|
||||
# cd /opt/ORB_SLAM3 && chmod +x build.sh && bash build.sh
|
||||
|
||||
# --- Application SLAM ---
|
||||
WORKDIR /app
|
||||
COPY src/ ./src/
|
||||
COPY config/ ./config/
|
||||
|
||||
# Créer config/ si vide
|
||||
RUN mkdir -p /app/config
|
||||
|
||||
# --- Port Flask ---
|
||||
EXPOSE 5000
|
||||
|
||||
# --- Healthcheck ---
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
|
||||
CMD curl -f http://localhost:5000/ || exit 1
|
||||
|
||||
# --- Entrypoint ---
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
CMD ["python3", "src/interface/app.py"]
|
||||
Reference in New Issue
Block a user