Sign inSign up

labshare/vision-api

By labshare

•Updated about 4 years ago

LabShare Vision API

Image
0

9.3K

labshare/vision-api repository overview

⁠LabShare Vision API

⁠Setup

  1. Clone the vision-api repository from GitHub using git clone https://github.com/LabShare/vision-api.
  2. Install package dependencies using npm i.

⁠Development

  1. Create an .env file in your working directory. See the sample-env⁠ file for an example.
  2. Run the server locally using node server.

⁠Environment File

  1. DEFAULT_DATA_FILE

This variable sets the path of the csv file that automatically loads in the Vision UI when the application starts up. If no file is provided no data populates.

Example: 
    DEFAULT_DATA_FILE="../default/data/finaldf2.csv"

2. DATASET_BASE_PATH

This variable defines the default path which is used to search for the main .csv files when the Vision UI application first loads. The .csv files in this folder will populate in a drop down in the Vision UI interface.

Example:
    DATASET_BASE_PATH="/my/csv/folder/location"

3. COLLECTION_PATH

This variable defines the path of the folder that contains csv and history datafiles. The contents of this folder are iterated over and the csv files found are populated in a drop down list in the Vision UI interface when the application first loads. Once a csv file is selected from the drop down and the "Load File" button is clicked the dataset is cached and the charts render. Once the file loads in the interface, the "Load History" link loads. When this happens this application, Vision Api, is called which iterates over this folder and retrieves the .history files so history can be loaded in the interface. This folder contains an id token which is used to change folders to pick up different data sets.

Example:
    COLLECTION_PATH="/my/dynamic/path/collection/<id>/plots"

4. ZOOM_CONFIG_FILE

This variable defines the path of the zoom configuration. This configuration specifies attributes pertaining to clicking on the deep zoom image such as scale of bounding box.

Example:
    ZOOM_CONFIG_FILE="./sample-zoom-config.json"

5. ZOOM_CHART_CSV_FILE

This variable defines the default path that contains locations and axes variables for bounding boxes that appear when you click on the deep zoom file.

Example:            
    ZOOM_CHART_CSV_FILE="C:\\my\\file\\path\\chart-locations.csv"

6. DZI_URL_BASE

This variable defines the url for the default dzi file. If this url exists and no dataset is supplied in Vision UI, this url is returned so the application has a deep zoom file that populates. Path should in in .dzi.

Example
    DZI_URL_BASE=http://localhost:3000/deepzoom/test4.dzi

7. WIPP_PYRAMIDS_URL

This variable defines the main url queried to retrieve locations for all pyramid .dzi files in WIPP. It is also used to retrieve the .csv files generated with the .dzi files that specify the locations for the bounding boxes (and x/y axis attributes) that appear when you click on the deep zoom image.

Example
    WIPP_PYRAMIDS_URL=http://127.0.0.1:32001/api/pyramids/

8. Other environment parameters

# Elastic APM agent configuration values (optional)
ELASTIC_APM_SERVICE_NAME=vision-api
ELASTIC_APM_SERVER_URL=http://localhost:8200

⁠Deployment

  1. Create a .env file in the root of the repository, using sample-env as an example.
  2. Configure kubectl with a kubeconfig pointing to the correct Kubernetes cluster. Optionally, pass the location of the kubeconfig file in the .env. This value defaults to the standard kubeconfig location.
  3. Run the script using: ./deploy.sh.

Tag summary

Content type

Image

Digest

sha256:bbb248c80…

Size

754.9 kB

Last updated

about 4 years ago

docker pull labshare/vision-api