Installation Guide

Make sure you already fulfill the requirement.

One-Click Installation

If you want to feel the quick experience

1. Download Installation and Environment Script

Download these two files below and put them in the same directory.

2. Input Credentials

Input your credentials to the Installation Script (stream.txt). You should have these credentials mentioned below:

  1. Nodeflux Gitlab Registry access token. Ask our sales if you don't have one.

  2. Visionaire Cloud email account and password. Just register to Visionaire Cloud.

  3. Visionaire Cloud access key and secret key. You can generate one from the Cloud dashboard.

  4. Visionaire Stream deployment key. You can access on Cloud dashboard 'Partnership' in the profile tab. If you don't see, it means that you don't have any deployment key. You can request to our sales.

Open stream.txt , then replace the credentials template with your corresponding credentials. Save the file when finished.

3. Run Installation Script

  • Open terminal in the directory where the installation script and environment script, then run the command below

chmod +x stream.txt
  • Run the installation script

./stream.txt
  • Check your localhost to see Visionaire Docker Stream is running.

Advanced Installation

If you are a developer and need more customization.

1. Input Registry Credential

You need credentials to access our Gitlab registry. If you do not have one, please contact our sales.

sudo docker login registry.gitlab.com -u <username> -p <token>

username and token your registry access token.

2. Install Docker PostgreSQL

  • Pull docker image

sudo docker pull postgres:12-alpine
  • Run docker image

sudo docker run \
--name=postgres \
-e POSTGRES_PASSWORD=test -p 5432:5432 \
-v /var/lib/postgresql/data:/var/lib/postgresql/data \
-e PGDATA=/var/lib/postgresql/data/pgdata \
-d postgres:12-alpine
  • Make sure the container is running

docker ps

3. Run Visionaire Docker Snapshot

  • Pull docker image

sudo docker pull registry.gitlab.com/nodefluxio/core-stream/fremisn:1.0.1-rc2
  • Run docker image

sudo docker run \
-it -p 4005:4004 -d \
--name fremisn registry.gitlab.com/nodefluxio/core-stream/fremisn:1.0.1-rc2 \
httpserver \
--access-key "YOUR_CLOUD_ACCESS_KEY" \
--secret-key "YOUR_CLOUD_SECRET_KEY" \
--verbose
  1. YOUR_CLOUD_ACCESS_KEYis your access key from Visionaire Cloud.

  2. YOUR_CLOUD_SECRET_KEYis your secret key from Visionaire Cloud.

  • Make sure the container is running

docker ps

4. Run Visionaire Docker Stream

  • Pull docker image

sudo docker pull registry.gitlab.com/nodefluxio/core-stream/visionaire4:latest
  • Run docker image

sudo docker run \
--gpus all --name=visionaire4 \
-v /tmp:/workspaces/visonaire4/.data \
-d --net host \
--add-host=host.docker.internal:127.0.0.1 \
-it registry.gitlab.com/nodefluxio/core-stream/visionaire4:latest \
--enable-cors \
--license-username="NODEFLUX_CLOUD_EMAIL" \
--license-password="NODEFLUX_CLOUD_PASSWORD" \
--deployment-key="DEPLOYMENT_KEY"
  1. NODEFLUX_CLOUD_EMAILis your registered email to access Visionaire Cloud.

  2. NODEFLUX_CLOUD_PASSWORDis your password of the account.

  3. DEPLOYMENT_KEYis the Visionaire Docker Stream deployment key you get from Visionaire Cloud.

  • Make sure the container is running

docker ps
  • Download sample video

https://drive.google.com/file/d/1LoKLQpsarHjsoJtYfBYLDZBbdOaEEU56/view?usp=sharing
  • Copy sample video to docker image directory

docker cp command.mp4 visionaire4:/workspaces/visionaire4/command.mp4

5. Run Docker Vanilla Dashboard

  • Pull docker image

sudo docker pull registry.gitlab.com/nodefluxio/core-stream/vanilla-dashboard:v0.3.1
  • Create .env sudo nano .env

NODE_ENV=production
DATABASE_URL=postgres://postgres:[email protected][IP_DATABASE]:5432/postgres?sslmode=disable
KEYSPACE=some-keyspace
FREMIS_URL=http://[IP_FREMIS]:4005/v1/face
GRIDLITE_WEBSOCKET_URL=ws://[IP_DOCKER_STREAM]:4004/event_channel
ENV_DEST=/
REACT_APP_HOST=http://[IP_DEPLOYMENT]
REACT_APP_API_CAMERA=http://[IP_DEPLOYMENT]:4004
REACT_APP_API_ENROLLMENT=http://[IP_DEPLOYMENT]/api
REACT_APP_API_WEB_SOCKET=ws://[IP_DEPLOYMENT]/api
PORT=80
  • Pull docker image

docker run -itd --net host \
--env-file ./.env \
registry.gitlab.com/nodefluxio/core-stream/vanilla-dashboard:v0.3.1 /bin/bash \
-c "./dbmate -d /opt/database migrate && env-gen && ./vanend"
  • Make sure the container is running

docker ps

At this point, you should have 4 containers running. You can check the react_app_host to see the Vanilla Dashboard.

6. Create Stream and Pipeline

Create Stream

Endpoint

POST [IP_DOCKER_STREAM]:4004/streams/0

Body as `Application/JSON`

{
"stream_address" : "/workspaces/visionaire4/command.mp4",
"stream_name" : "Camera 1"
}

Create Pipeline

Endpoint

POST http://[IP_DOCKER_STREAM]:4004/pipeline/0/<stream_id>/<analytic_id>

You should change stream_id from theCreate Stream response payload. Analytic_id by default is NFV4-FR

Body as `Application/JSON`

{}

At this point, you should have one stream running from the last downloaded video.