-
Notifications
You must be signed in to change notification settings - Fork 0
/
start-plater-kg2.sh
36 lines (30 loc) · 1.3 KB
/
start-plater-kg2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
: ' This script runs Plater for a given KG2c version. Prior to running this script you need to have run the
build-kg2-plater.sh script for the given KG2c version (to prep the Neo4j database that Plater will query behind
the scenes).
Usage: bash -x start-plater-kg2.sh <kg2_version, e.g., 2.8.4> <neo4j_password>
'
kg2_version="$1"
neo4j_password="$2"
set -e # Stop on error
neo4j_container_name=neo4j-kg${kg2_version}c
# First delete any potential duplicate neo4j container
set +e # Temporarily don't stop on error, in case this container doesn't already exist
sudo docker stop ${neo4j_container_name}
sudo docker rm ${neo4j_container_name}
set -e # Go back to stopping on error
# Start up the neo4j database/server that Plater will query behind the scenes
sudo docker run -d \
-p 7474:7474 -p 7687:7687 \
--name ${neo4j_container_name} \
--volume=$HOME/neo4j/data:/data \
--env NEO4J_AUTH=neo4j/${neo4j_password} \
--env NEO4J_dbms_transaction_timeout=600 \
renciorg/neo4j-4.4.10-apoc-gds:0.0.1
sleep 1m # Wait for neo4j to start up
# Record time at end of build
echo end_of_plater_build: >> buildtime.txt
date +%s >> buildtime.txt
# Start up Plater
cd ~/Plater
. ${HOME}/.pyenv/versions/platerenv/bin/activate
./main.sh