Bisque Docker Environment Setup Instructions

Docker/Project Source

Installation

Pre-requisite

Create the Docker Image

Look into the UCSB-VRL/bisque-build repository on how to create Docker container images for development

Run Environment

mkdir ws && cd ws && git clone https://github.com/UCSB-VRL/bisque
mkdir container-modules container-data container-config && cp -r bisque/modules/* container-modules/
# Docker Run
docker run --name bisque-dev --rm -p 8080:8080 -p 27000:27000 \
 -v $(pwd)/container-modules:/source/modules \
 -v $(pwd)/container-data:/source/data \
 -v $(pwd)/container-config:/source/config \
 -v /var/run/docker.sock:/var/run/docker.sock \
 --ipc=host \
 --net=host \
 'vishwakarmarhl/ucsb-bisque05-svc:dev'

Alternately if you want an interactive log for docker run use the below command

docker run -it -p 8080:8080 -p 27000:27000 \
 -v $(pwd):/ws \
 -v /var/run/docker.sock:/var/run/docker.sock \
 --mount source=bqvol,target=/ws/bqvol \
 --ipc=host \
 --net=host \
 ucsb-bisque05-svc:dev
bisque@ubuntu:~$ docker ps
CONTAINER ID        IMAGE                                  COMMAND                  CREATED             STATUS              PORTS                                              NAMES
a1162677d66a        vishwakarmarhl/ucsb-bisque05-svc:dev   "/builder/run-bisque…"   13 minutes ago      Up 13 minutes       0.0.0.0:8080->8080/tcp, 0.0.0.0:27000->27000/tcp   bisque-dev
docker stop $(docker ps -a -q --filter ancestor=vishwakarmarhl/ucsb-bisque05-svc:dev --format="{{.ID}}")
bisque-host$ docker exec -t -i bisque-dev /bin/bash
docker run --name bisque-dev --rm -p 8080:8080 -p 27000:27000 \
-e BISQUE_DBURL=postgresql://rahul:rahul@localhost/bqmurks58 \
'vishwakarmarhl/ucsb-bisque05-svc:dev'

Develop in Docker (Work In Progress !!)

Run the containerized bisque server as described in the first half of this document

docker exec -it bisque-dev /bin/bash
root@9362d1f8bf12:/source# cd modules/MaskRCNN
root@9362d1f8bf12:/source/modules/MaskRCNN# source /usr/lib/bisque/bin/activate
root@9362d1f8bf12:/source/modules/MaskRCNN# python setup.py
docker pull biodev.ece.ucsb.edu:5000/tflow-mrcnn-mod-v1
CONTAINER=$(docker create --ipc=host biodev.ece.ucsb.edu:5000/tflow-mrcnn-mod-v1  python PythonScriptWrapper.py http://192.168.0.14:8080/data_service/00-s3KxZhuvBt8vhER5RD7wdX 15 0.05 http://192.168.0.14:8080/module_service/mex/00-wRq68hGv5HTtr6mBsfM4CG admin:00-wRq68hGv5HTtr6mBsfM4CG)
docker start $CONTAINER
MODULE_RETURN=$(docker wait  $CONTAINER)
docker logs $CONTAINER
sh docker_run python PythonScriptWrapper.py \
  http://192.168.0.14:8080/data_service/00-s3KxZhuvBt8vhER5RD7wdX \
  15 0.05 \
  http://192.168.0.14:8080/module_service/mex/00-wRq68hGv5HTtr6mBsfM4CG \
  admin:00-wRq68hGv5HTtr6mBsfM4CG)

Notes: Look into the README files on the modules for more commands on test/debug