操作系统
环境依赖
sudo apt-get install build-essential
sudo apt-get install cmake
sudo apt-get install git
curl -sSL https://get.daocloud.io/docker | sh
mkdir /data
配置项目
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
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 build -t stitch_worker .
docker run -d -v /data:/data stitch_worker
- Insta_auto_stitcher [JFinal]
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