-
You must have a recent version of Docker Engine installed
-
Docker disk image size must be increased to 120GB (from the default of 60GB) to install the full Rosette Server package.
-
If installing on Windows, Docker for Windows must be installed (not Docker Toolbox or Docker Machine) with Hyper-V enabled.
The Docker memory must be set to at least 16 GB if all endpoints are licensed and activated, and may require more depending on your application.
At a minimum, the Docker maximum memory should be the same or more than the Rosette JVM heap size. Otherwise, when running in a Docker container Rosette Server may get SIGKILL when the JVM asks for more memory the Docker allocates.
Once the Rosette files are downloaded and installed, Docker can be run without being connected to the internet. To install offline:
-
Download the component file tarballs, along with the Docker files and license, from the email containing the Rosette Server files.
-
Run import_docker_images.sh
to create the Docker volumes.
-
Run the Docker container (docker compose
) as described below.
Install and run Docker container
To download the volumes directly, you must have an internet connection.
-
Download the Docker file docker-compose.yml
and license file rosette-license.xml
. Note the location of the license file (path-to-license).
-
To run the Docker container (and download the volumes if they haven't already been downloaded):
ROSAPI_LICENSE_PATH=<path-to-license>/rosette-license.xml docker compose up
You can also provide a stack name:
ROSAPI_LICENSE_PATH=<path-to-license>/rosette-license.xml docker compose\
-p <stack-name> up
-
The Rosette RESTful server will be accessible on the Docker host on the port defined in the docker-compose.yml
file.
Note
If your installation includes the entity extraction component (rex-root
), you may see failed to open ...
warning messages for data files in languages not installed in your system. These can safely be ignored.
Modifying Rosette parameters in Docker
Important
To modify Rosette parameters, edit the docker-compose.yaml
file.
The following configuration options can be changed by editing the environment section of the file.
Uncomment the line for the variable and change the value.
Note
To run the entity extraction and linking, sentiment analysis, and topic extraction endpoints, the recommended value for ROSETTE_JVM_MAX_HEAP is 16GB. The default value in the file is 4 GB.
environment:
# - ROSETTE_JVM_MAX_HEAP=4 # max Java heap size in GB, default is 4, must be >=4;
# to run all endpoints the recommended minimum is 16
# - ROSETTE_WORKER_THREADS=2 # number of worker threads, default is 2, must be >=1
# - ROSETTE_PRE_WARM=false # pre-warm the server on startup, default is false,
# valid values are true|false
# - ROSETTE_DOC_HOST_PORT=localhost:8181 # hostname should be accessible on the network,
# port value should match mapped port above
You can specify your own volume, for example, backed by a different volume driver.
volumes:
# if a local volume is not desirable, change this to suit your needs
rosette-roots-vol:
The default docker configuration uses port 8181 for the Rosette endpoints. To change this, modify the ports section.
ports:
- "8181:8181"
Only the first value in the port statement should be changed. The port statement and the ROSETTE_DOC_HOST_PORT
value must match.
ports:
- "4444:8181"
environment:
- ROSETTE_DOC_HOST_PORT=localhost:4444
If you're accessing the documentation from a different machine, change local host to the documentation machine network accessible host name.
Adding and modifying Rosette files in Docker
There are times you may need to modify and/or add files to the Rosette Server installation. For example, to add an English gazetteer to entity extraction, you must add the file to the installDirectory/roots/rex/<version>/data/gazetteer/eng/accept
directory.
To access the installation directories within the Docker volumes:
-
By default, the server volume is mounted as read-only (ro
). Before starting the container, edit the docker-compose.yml
file to make the Rosette server volume writable. Remove the :ro
from the end of the rosette-roots-vol:
statement:
As shipped:
volumes:
- rosette-roots-vol:/rosette/server/roots:ro
- ${ROSAPI_LICENSE_PATH}:/rosette/server/launcher/config/rosapi/rosette-license.xml:ro
Modified:
volumes:
- rosette-roots-vol:/rosette/server/roots
- ${ROSAPI_LICENSE_PATH}:/rosette/server/launcher/config/rosapi/rosette-license.xml:ro
-
Start the Docker container:
ROSAPI_LICENSE_PATH=<path-to-license>/rosette-license.xml docker-compose up
-
Determine the name of the Docker container:
docker ps
-
Execute an interactive shell on the container:
docker exec -it containerID sh
-
Once in the shell, you can add and modify files within the container.
-
Edit the docker-compose.yml
file to set the server volume back to read-only (ro
):
volumes:
- rosette-roots-vol:/rosette/server/roots:ro
-
Stop and restart the Docker container to include the new and edited files.