Purpose

To provide a ready to run version of MetaMap that should run on any computer that has Docker installed.

Prerequisites

The document assumes that you already have Docker installed and have a Docker container running. See the Docker documentation (https://docs.Docker.com/) for more information on installing and running Docker on your platform.

Getting the Docker Image

The Docker image containing the MetaMap installation can be downloaded at:

Please be aware that the image is quite large; its size is approximately 16GB uncompressed.

Loading the Docker Image

After downloading, load the image into the Docker container using the command docker load:

$ docker load --input metamap2016v2.dockerimage

More information on the docker load command can be found at the "docker load" manual page: (https://docs.docker.com/engine/reference/commandline/load/).

Running the Docker Image

After loading the image into the container, start the image using the command docker run:

$ docker run -it metamap2016v2
Note: the metamap dockerimage may not be loaded under the name "metamap2016v2" and the command above will not work. In that case use the command "docker images" to determine the image id of the metamap2016v2 image and then use that image id to run the metamap image:

$ docker run -it 

At the Docker image prompt migrate to /opt/public_mm start the MedPost/SKR tagger server and then run MetaMap:

$ docker run -it metamap2016v2
root@4af8b235d7f3:/# cd /opt/public_mm/
root@4af8b235d7f3:/opt/public_mm# bin/skrmedpostctl start
$Starting skrmedpostctl: 
started.
root@4af8b235d7f3:/opt/public_mm# bin/metamap
/opt/public_mm/bin/SKRrun.16 /opt/public_mm/bin/metamap16.BINARY.Linux --lexicon db -Z 2016AA
Berkeley DB databases (USAbase 2016AA strict model) are open.
Static variants will come from table varsan in /opt/public_mm/DB/DB.USAbase.2016AA.strict.
Derivational Variants: Adj/noun ONLY.
Variant generation mode: static.
Established connection $stream(139712711817136) to TAGGER Server on localhost.

metamap16.BINARY.Linux (2016)

Control options:
  composite_phrases=4
  lexicon=db
  mm_data_year=2016AA
|: The patient has no signs of pneumonia.
|: 
Processing 00000000.tx.1: The patient has no signs of pneumonia.

Phrase: The patient
Meta Mapping (1000):
  1000   *^patient (Patients) [Patient or Disabled Group]
Meta Mapping (1000):
  1000   Patient (Abortion consent:Finding:Point in time:^Patient:Document) [Clinical Attribute]
Meta Mapping (1000):
  1000   Patient (Hysterectomy consent:Finding:Point in time:^Patient:Document) [Clinical Attribute]
Meta Mapping (1000):
  1000   Patient (Sterilization consent:Finding:Point in time:^Patient:Document) [Clinical Attribute]

Phrase: has

Phrase: no signs of pneumonia.
Meta Mapping (708):
   770   signs (Aspects of signs) [Functional Concept]
   604 N PNEUMONIA (Pneumonia) [Disease or Syndrome]
Meta Mapping (708):
   770   signs (Manufactured sign) [Manufactured Object]
   604 N PNEUMONIA (Pneumonia) [Disease or Syndrome]
Meta Mapping (708):
   770   SIGNS (Physical findings) [Finding]
   604 N PNEUMONIA (Pneumonia) [Disease or Syndrome]
|: root@4af8b235d7f3:/opt/public_mm# exit
$ 

For more information on running MetaMap see "The MetaMap FAQ": (https://metamap.nlm.nih.gov/Docs/FAQ/MM_FAQ.pdf).

More information on the docker run command can be found at the "docker run" manual page: https://docs.docker.com/engine/reference/commandline/run/

See also, "Run a simple application" (https://docs.docker.com/engine/tutorials/usingdocker/).

Current Issues

The current Docker image does not provide enough physical memory to the resulting virtual machine to run the WSD Server.

Due to limited amount of storage space available in the image it may be necessary to mount external data volumes to add working storage to the container. See guide named: "Manage data in containers" (https://docs.docker.com/engine/tutorials/dockervolumes/)

Generating the docker image

The docker image was generated using the following docker script: https://metamap.nlm.nih.gov/download/metamap2016v2_dockerfile .




This document was generated using AFT v5.098