Skip to content

Commit

Permalink
Merge pull request #674 from EBISPOT/docker_heap_size
Browse files Browse the repository at this point in the history
Make heap size configurale.
  • Loading branch information
henrietteharmse authored Jun 12, 2024
2 parents 0ebadb3 + 8f4a831 commit 7965403
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ However, if you just want to try it out, this should get you going:

You should now be able to access the OLS4 frontend at `http://localhost:8081`.

If you need to set the heap size, you can do so using:

JAVA_OPTS="-Xms5G -Xmx25G" docker compose up

If you want to test it with your own ontology, copy the OWL or RDFS ontology file to the `testcases` folder (which is
mounted in Docker). Then make a new config file for your ontology in `dataload/configs` (you can use `efo.json` as a
template). For the `ontology_purl` property in the config, use e.g. `file:///opt/dataload/testcases/myontology.owl` if
Expand Down Expand Up @@ -174,6 +178,10 @@ or if you want to load all testcases, you can use

./dev-testing/teststack.sh ./testcases ./output

If you need to set the Java heap size, you can set the environment the JAVA_OPTS variable as follows:

export JAVA_OPTS="-Xms5G -Xmx10G"

Once Neo4J and Solr is up, to start the backend (REST API) you can run:

./dev-testing/start-backend.sh
Expand Down
4 changes: 3 additions & 1 deletion dataload/create_datafiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ JSON_PATH_LINKED=$OUTDIR/ontologies_linked.json

rm -f $OUTDIR/*

echo JAVA_OPTS=$JAVA_OPTS

echo rdf2json
java -DentityExpansionLimit=0 -DtotalEntitySizeLimit=0 -Djdk.xml.totalEntitySizeLimit=0 -Djdk.xml.entityExpansionLimit=0 -jar $SCRIPT_PATH/rdf2json/target/rdf2json-1.0-SNAPSHOT.jar --config "$CONFIG_URL" --output "$JSON_PATH" "${@:3}"
java $JAVA_OPTS -DentityExpansionLimit=0 -DtotalEntitySizeLimit=0 -Djdk.xml.totalEntitySizeLimit=0 -Djdk.xml.entityExpansionLimit=0 -jar $SCRIPT_PATH/rdf2json/target/rdf2json-1.0-SNAPSHOT.jar --config "$CONFIG_URL" --output "$JSON_PATH" "${@:3}"

echo linker
java -jar $SCRIPT_PATH/linker/target/linker-1.0-SNAPSHOT.jar --input "$JSON_PATH" --output "$JSON_PATH_LINKED"
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
version: '3'
services:
ols4-dataload:
environment:
- JAVA_OPTS=${JAVA_OPTS}
build: ./dataload
volumes:
- ols4-solr-data:/opt/solr/server/solr:rw
Expand Down

0 comments on commit 7965403

Please sign in to comment.