Sign inSign up

craicerjack/bioopener

By craicerjack

•Updated about 10 years ago

Image
0

1.2K

craicerjack/bioopener repository overview

⁠Sample Docker image for BioOpener example

Dockerised Virtuoso image adapted from tenforce⁠ image which is most popular image on docker hub.

The Virtuoso is built from a specific commit SHA in https://github.com/openlink/virtuoso-opensource⁠.

⁠Running your Virtuoso

docker run -p 8890:8890 -p 1111:1111 \
    -e DBA_PASSWORD=dba \
    -e DEFAULT_GRAPH=http://sels.insight.org/genomics/graph/tcga/ov/ \
    -e SPARQL_UPDATE=true  \
    -v /my/absolute/path/to/virtuoso.db:/var/lib/virtuoso/db/virtuoso.db \
    --name virt \
    -d vir
  • The Virtuoso database folder is mounted in /var/lib/virtuoso/db.
  • The Docker image exposes port 8890 and 1111.
  • The dba password can be set at container start up via the DBA_PASSWORD environment variable. If not set, the default dba password will be used.
  • The SPARQL_UPDATE permission on the SPARQL endpoint can be granted by setting the SPARQL_UPDATE environment variable to true.
  • The DEFAULT_GRAPH sets the deafult graph for the database.
  • The -v path_on_system/path_on_container command mounts the .db virtuoso database on the specified path. This path needs to match the .ini file.

⁠Dumping your Virtuoso data as quads

Enter the Virtuoso docker, open ISQL and execute the dump_nquads procedure. The dump will be available in /my/path/to/the/virtuoso/db/dumps.

docker exec -it my-virtuoso bash
isql-v -U dba -P $DBA_PASSWORD
SQL> dump_nquads ('dumps', 1, 10000000, 1);

For more information, see http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtRDFDumpNQuad⁠

⁠Loading quads in Virtuoso

⁠Manually

Make the quad .nq files available in /my/path/to/the/virtuoso/db/dumps. The quad files might be compressed. Enter the Virtuoso docker, open ISQL, register and run the load.

docker exec -it my-virtuoso bash
isql-v -U dba -P $DBA_PASSWORD
SQL> ld_dir('dumps', '*.nq', 'http://foo.bar');
SQL> rdf_loader_run();

Validate the ll_state of the load. If ll_state is 2, the load completed.

select * from DB.DBA.load_list;

For more information, see http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtBulkRDFLoader⁠

⁠Automatically

By default, any data that is put in the toLoad directory in the Virtuoso database folder (/my/path/to/the/virtuoso/db/toLoad) is automatically loaded into Virtuoso on the first startup of the docker container. The default graph is set by the DEFAULT_GRAPH environment variable, which defaults to http://localhost:8890/DAV.

Tag summary

Content type

Image

Digest

Size

181.4 MB

Last updated

about 10 years ago

docker pull craicerjack/bioopener