Visionaire Documentation
ENG
Search…
⌃K

Advanced Installation

Custom installation to fit your environment.
If you are a developer and need more customization. Make sure you already fulfill the requirement.
Docker Stream 4.32.18 is released. View Changelogs for more detail
Please make sure to run all commands in the same terminal. If you accidentally closed the terminal earlier, be sure to re-run variables export commands and continue with the installation.

1. Set Environment Variable

Run these commands in your Terminal.
export VISIONAIRE_CLOUD_ACCESS_KEY=<your visionaire cloud access key>
export VISIONAIRE_CLOUD_SECRET_KEY=<your visionaire cloud secret key>
export DEPLOYMENT_KEY_SNAPSHOT=<your snapshot deployment key>
export DEPLOYMENT_KEY_STREAM=<your stream deployment key>
YourDEPLOYMENT_KEY_SNAPSHOTshould be different fromDEPLOYMENT_KEY_STREAM
  1. 1.
    YOUR_CLOUD_ACCESS_KEYis your access key from Visionaire Cloud.
  2. 2.
    YOUR_CLOUD_SECRET_KEYis your secret key from Visionaire Cloud.
  3. 3.
    NFFS-FR should be contained in your deployment key details
Step 1. Enter credentials.

2. Create User-Defined Docker Network & Volumes

Create a user-defined bridge network:
docker network create nf-visionaire
Create docker volumes for postgresdb:
docker volume create postgres-data
Step 2. Create network and volume for postgres.

3. Run Postgres Container

Create Postgre Container
docker run -it -d -p 5432:5432 \
--name=postgresdb \
--network="nf-visionaire" \
--restart unless-stopped \
-e POSTGRES_PASSWORD=nfvisionaire123 \
-e POSTGRES_DB=nfvisionaire \
-e POSTGRES_USER=postgres \
-e PGDATA=/var/lib/postgresql/data/pgdata \
-v postgres-data:/var/lib/postgresql/data \
postgres:12-alpine
Init new additional DB
docker run -it --rm \
--network="nf-visionaire" \
-e PGPASSWORD=nfvisionaire123 \
postgres:12-alpine \
sh -c 'psql -h postgresdb -U postgres -c "CREATE DATABASE nfv4;" || true'
Step 3. Create database and table.

4. Run Visionaire Docker Snapshot (fremis-n:v2.12.7)

  • Visionaire Docker Snapshot started from versionv1.0.0no longer requires cloud username and password.
  • Start from installation will be done using Postgres database to ensure data persistence. Database migration is required once.
  • If you have enrollments using fremis-n version below 1.4.0 and upgrading to version 1.4.0, you need to re-enroll the enrollments.
Run FremisN Services
docker run -it -d -p 4005:4005 \
--name fremisn \
--network="nf-visionaire" \
--restart unless-stopped \
nodefluxio/fremis-n:v2.12.3-cpu \
httpserver \
--access-key ${VISIONAIRE_CLOUD_ACCESS_KEY} \
--secret-key ${VISIONAIRE_CLOUD_SECRET_KEY} \
--dk ${DEPLOYMENT_KEY_SNAPSHOT} \
--db-address postgresdb \
--db-port 5432 \
--db-name nfvisionaire \
--db-username postgres \
--db-password nfvisionaire123 \
--listen-port 4005 \
--storage postgres \
--verbose
Option
Description
-h,--help
Print this help message and exit
--access-key
Nodeflux access key
--secret-key
Nodeflux secret key
--dk
Deployment Key
--listen-addr
Address to serve REST API
-p,--listen-port
Address to serve REST API
--listen-port-monitoring
Address port of monitoring
--server-threads
Maximum number of server's threads
--similarity-threshold
Default similarity threshold
--max-workers
Maximum number of extraction workers
--storage
Storage System. The choice are: rocksdb and postgres
--data-path
Database Path of RocksDB, if rocksdb selected
--db-address
Database Address of Postgres server, if postgres selected
--db-port
Database port of Postgres server, if postgres selected
--db-name
Database name of Postgres server, if postgres selected
--db-username
Database username of Postgres server, if postgres selected
--db-password
Database password of Postgres server, if postgres selected
--partition-start
The starting number of partition set
--partition-end
The ending number of partition set
-v,--verbose
Turn on verbose logging
  • You can use GPU by using gpu tag. Example:nodefluxio/fremis-n:v1.0.0-gpu, then enabling --gpus-all in docker command and --config-path /app/config.yml in fremisn command
  • If you run with License Box, add this scriptdocker run --add-host "api.cloud.nodeflux.io:<license_box_ip>"
Step 4. Run Visionaire Docker Snapshot.

5. Run Visionaire Docker Stream (visionaire4:4.36.1)

Visionaire Docker Stream started from a version4.10.0no longer requires a cloud username and password. Add access-key and secret-key for authorization
export HOST_ADDR=$(ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
docker run -it -d -p 4004:4004 -p 9090:9090 -p 3000:3000 \
--name=visionaire4 \
--network="nf-visionaire" \
--restart unless-stopped \
--gpus all \
nodefluxio/visionaire4:4.36.1 \
--enable-cors \
--access-key ${VISIONAIRE_CLOUD_ACCESS_KEY} \
--secret-key ${VISIONAIRE_CLOUD_SECRET_KEY} \
--deployment-key ${DEPLOYMENT_KEY_STREAM} \
--db-host postgresdb \
--db-port 5432 \
--db-name nfv4 \
--db-user postgres \
--db-password nfvisionaire123 \
--listen-port 4004 \
--fr-address ${HOST_ADDR}:4005 \
--drift-monitoring 0.6 \
--cloud-monitor \
--fr-keyspace-name default
Options
Description
--help
Produce help message
--log-severity arg (=info)
Set default log severity (trace, debug, info, notice, warning)
--node-num arg (=0)
Setting node number for clustering (default is 0 or master)
--master-address arg (=127.0.0.1)
The address of master (if running asslavemode or node_num>0)
--master-port arg (=4004)
The listening address of master (default is 4004)
--access-key arg (=default)
License access key
--secret-key arg (=secret)
License secret key
--deployment-key arg
Deployment key
--refresh-timeout arg (=3)
Refresh timeout
--db-host arg (=host.docker.internal)
Main database host address
--db-port arg (=5432)
Main database host port number (default=5432)
--db-user arg (=postgres)
Main database username
--db-password arg (=test)
Main database username
-db-name arg (=postgres)
Main database name
--listen-address arg (=0.0.0.0)
Master service listening address
--listen-port arg (=4004)
Master service listening port
--enable-cors
Enable CORS-Origin
--mode arg (=master)
Running mode (master, migration)
--service-hash arg (=0)
(internally used)
--service-gpu-id arg (=-1)
(internally used)
--credential-bundle arg (=./data/credential_stream.csv)
Credential bundle as csv file (access_key, secret_key, deployment_key)
--fr-address arg (=host.docker.internal:4005)
Location of Docker Snapshot Face Recognition server, default: host.docker.internal:4005
--fr-keyspace-name arg (=some-keyspace)
Keyspace of Docker Snapshot server, default: some-keyspace
--drift-monitoring
Feature to send frame to Nodeflux Cloud for model improvement. 0 to 1 to define threshold.
--fr-min-face-size arg (=10)
Face size, default: 10
--fr-embedding-event-enable
Enable embedding information on event as vector of float
--cloud-monitor
Enable sending monitoring data to cloud.
  1. 1.
    YOUR_CLOUD_ACCESS_KEYis your access key from Visionaire Cloud.
  2. 2.
    YOUR_CLOUD_SECRET_KEYis your secret key from Visionaire Cloud.
  3. 3.
    DEPLOYMENT_KEYis theVisionaire Docker Streamdeployment key you get from Visionaire Cloud.
  4. 4.
    One Deployment Key only works for a single instance. You cannot run the same deployment key in more than one instance.
  5. 5.
    You can use the same secret key and access key fromDocker Snapshot
  6. 6.
    If you run with License Box, add this scriptdocker run --add-host "api.cloud.nodeflux.io:<license_box_ip>"
YourDEPLOYMENT_KEY_SNAPSHOTshould be different fromDEPLOYMENT_KEY_STREAM
Step 5. Run Visionaire Docker Stream.

6. Run Docker Vanilla Dashboard (vanilla-dashboard:1.11.9)

  • Run docker image
Use "--metric-wlm CM / LEVEL" parameter if you use WLM in vanilla dashboard. Choose either CM or LEVEL to measure the water.
export HOST_ADDR=$(ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')
docker run -it -d -p 8008:8008 \
--name vanilla-dashboard \
--network="nf-visionaire" \
--restart unless-stopped \
nodefluxio/vanilla-dashboard:1.11.9 \
./vanend \
--db-host postgresdb:5432 \
--db-name nfvisionaire \
--db-user postgres \
--db-password nfvisionaire123 \
--visionaire-host ${HOST_ADDR}:4004 \
--fremisn-url http://${HOST_ADDR}:4005/v1/face \
--website-host ${HOST_ADDR}:8008 \
--port 8008 \
--fremisn-keyspace default \
--fremisn-rto 10 \
--metric-wlm CM / LEVEL
Parameters for Vanilla.
Options
Description
--log , -l
logging level, useful for debugging session. available (warning, info, debug) (default: info)
--port , -p
app HTTP port (default: 80)
--node-env
running mode, development or production (default: production)
--db-host, --dbhost
postgreSQL host address, ex: 127.0.0.1:5432 (default: 127.0.0.1:5432)
--db-user, --dbusr
postgreSQL database username, ex: postgres (default: postgres)
--db-password, --dbpass
postgreSQL database password, ex: password (default: test)
--db-name, --dbnm
postgreSQL database name, ex: postgres (default: postgres)
--fremisn-url, --frnurl
fremisn service url (default: http://localhost:4005/v1/face)
--fremisn-keyspace, --frnks
fremisn user keyspace, ex: some-keyspace (default: some-keyspace)
--visionaire-host, --vshst
Visionaire Docker Stream host, (default: localhost:4004)
--cron-partition, --crp
database cronjob partition (default: 0 0 * * *)
--website-host
front end website host (default: localhost)
--help, -h
show help
--version, -v
print the version
--fremisn-rto, --frnrto
fremisn max request timeout in second (default: 10)
  • At this point, you should have 4 containers running. You can check your_ip:8008 to see the Vanilla Dashboard.
Last step. Run Docker Vanilla Dashboard

Monitoring Tools (Additional)

1.Clone the dockprom repository and run
git clone https://github.com/stefanprodan/dockprom
cd dockprom
2. Add prometheus.yml to prometheus/prometheus.yml and edit the IP address with yours.
prometheus.yml
277B
Code
prometheus.yml
3. Run Dockprom
ADMIN_USER=admin ADMIN_PASSWORD=admin ADMIN_PASSWORD_HASH=JDJhJDE0JE91S1FrN0Z0VEsyWmhrQVpON1VzdHVLSDkyWHdsN0xNbEZYdnNIZm1pb2d1blg4Y09mL0ZP docker-compose up -d
4. Add the visionaire4 Grafana dashboard by importing visionaire4_dashboard.json
visionaire4_dashboard.json
48KB
Code
visionaire4_dashboard.json
5. Restart Grafana
docker restart grafana