工厂拼接服务器配置

操作系统

  • 14.04.1-Ubuntu

环境依赖

  • g++
sudo apt-get install build-essential
  • cmake
sudo apt-get install cmake
  • git
sudo apt-get install git
  • docker
curl -sSL https://get.daocloud.io/docker | sh
  • docker映射目录
mkdir /data

配置项目

  • multicast-ip-service
    • Git地址:https://github.com/jerett/multicast-ip-service
    • 加载Git依赖
git submodule update --init --recursive
  • 配置开机启动
    • 启动脚本:/etc/init.d/multicast_ip.sh
#!/bin/bash
multicast_ip_serverd -i eth0 -k philips-stitch -d
exit 0
+ 添加到启动项
sudo chmod 755 /etc/init.d/multicast_ip.sh
cd /etc/init.d
sudo update-rc.d multicast_ip.sh defaults 95
  • gearman
    • 镜像:thonatos/gearmand
    • 启动镜像
docker run -d -p 4730:4730 -v /data:/data thonatos/gearmand
  • stitch-worker
    • Git地址:https://code.aliyun.com/jerett/stitch-worker
    • Dockerfile
FROM registry.cn-shenzhen.aliyuncs.com/implementsio/opencv
#build stitch worker
RUN mkdir /build
COPY ./stitch-worker /build/stitch-worker
RUN cd /build/stitch-worker \
    && cmake . && make && cp stitch-workerd /usr/local/bin
RUN echo "/usr/local/lib" >> /etc/ld.so.conf && ldconfig
#clean build
RUN rm -rf /build
#data storage
VOLUME /data
  • 编译docker镜像
docker build -t stitch_worker .
  • 启动镜像
docker run -d -v /data:/data stitch_worker
  • Insta_auto_stitcher [JFinal]
    • Git地址:https://code.aliyun.com/lmmmowi/Insta_auto_stitcher
    • Dockerfile:项目内置
    • 编译docker镜像
docker build -t auto_stitcher_server .
  • 启动镜像
docker run -d -p 8080:8080 -v /data:/data auto_stitcher_server

Docker compose

version: '2'
services:
  gearman:
    image: thonatos/gearmand:latest
    restart: always
    ports:
    - 4730:4730
    volumes:
    - /data/gearman:/data
    networks:
    - insta360
  auto_stitcher_server:
    image: daocloud.io/lmmmowi/insta-project-auto-stitcher:master
    restart: always
    ports:
    - 8080:8080
    volumes:
    - /data:/data
    networks:
    - insta360
  stitch_worker:
    image: daocloud.io/lmmmowi/insta-stitch-worker:master
    restart: always
    volumes:
    - /data:/data
    networks:
    - insta360
    depends_on:
    - gearman
networks:
  insta360:
    driver: bridge

你可能感兴趣的:(工厂拼接服务器配置)