Run the pipeline
Run BioKb-Coconut
From command line
For sure the simplest way is to run all steps. After installation (see Installation) just run:
biokb_coconut import-data
biokb_coconut create-ttls
Before importing into Neo4J, make sure Neo4J is running (see below "How to run Neo4J").
Then import into Neo4J:
biokb_coconut import-neo4j -p neo4j_password
http://localhost:7474 (user/password: neo4j/neo4j_password)
For more options see the CLI options section below.
As RESTful API server
Usage: biokb_coconut run-server [OPTIONS]
biokb_coconut run-server
- user: admin
- password: admin
| Option | long | Description | default |
|---|---|---|---|
| -P | --port | API server port | 8000 |
| -u | --user | API username | admin |
| -p | --password | API password | admin |
http://localhost:8000/docs#/
- Import data
- Export ttls
- Run Neo4J (see below "How to run Neo4J")
- Import Neo4J
Be patient, each step takes several minutes.
As Podman/Docker container
For docker just replace podman with docker in the commands below.
Build & run with Podman:
git clone https://github.com/biokb/biokb_coconut.git
cd biokb_coconut
podman build -t biokb_coconut_image .
podman run -d --rm --name biokb_coconut_simple -p 8000:8000 biokb_coconut_image
- Login: admin
- Password: admin
With environment variable for user and password for more security:
podman run -d --rm --name biokb_coconut_simple -p 8000:8000 -e API_PASSWORD=your_secure_password -e API_USER=your_secure_user biokb_coconut_image
http://localhost:8000/docs
On the website: 1. Import data 2. Export ttls
Neo4j import in this context is not possible because Neo4J is not running in the same network as service, but the exported turtles can be imported into any Neo4J instance using the CLI (biokb_coconut import-neo4j).
to stop the container:
podman stop biokb_coconut_simple
to rerun the container:
podman start biokb_coconut_simple
As Podman/Docker networked containers
If you have docker or podman on your system, the easiest way to run all components (relational database, RESTful API server, phpMyAdmin GUI) is to use networked containers with podman-compose/docker-compose.
git clone https://github.com/biokb/biokb_taxtree.git
cd biokb_taxtree
podman-compose -f docker-compose.yml --env-file .env_template up -d
podman-compose --env-file .env_template up -d
http://localhost:8001/docs
On the website: 1. Import data 2. Export ttls 3. Import Neo4J
stop with:
podman pod stop pod_biokb_db
podman-compose stop
rerun with:
podman pod start pod_biokb_db
podman-compose start
Tip: Copy the .env_template to .env and change the default passwords in the .env file before starting the containers for better security. If you have done that you need to use --env-file .env instead of --env-file .env_template in the commands above or just omit the --env-file option (because the default is .env).