Skip to content
rspeer edited this page Oct 10, 2014 · 13 revisions

Docker is a platform for making software reproducible, by reproducing the entire Linux environment it runs in.

We're still working on the best way to use Docker to work with ConceptNet. Right now it involves some long build times and large downloads. But it does make all the dependencies of ConceptNet explicit, and makes the process of setting it up absolutely repeatable.

These Docker images exist so far:

  • conceptnet-base: a base system with the dependencies needed to use ConceptNet with all its features. Includes Python 3.4, numpy, scipy, and the assoc_space library.
  • conceptnet-full: We built ConceptNet so you don't have to. This is a large (~50 GB) image containing the results of a full build of ConceptNet.
  • conceptnet-web: An image that runs the ConceptNet Web server, including the browseable frontend and the API. The ConceptNet code and DB are included. The full build results are left out, so it's a smaller package than conceptnet-full.

A ridiculously straightforward example

Once you've got Docker set up, type this:

sudo docker run rspeer/conceptnet-web

Let it download all its stuff if it hasn't already. When it's done, you'll be running the ConceptNet 5.3 server on your computer, on port 10053.

But wait, how do I get to the data?

This is a good question.

The conceptnet-full and conceptnet-web images contain the ConceptNet data inside them, in the directory /src/conceptnet/data. But you may want to get at that data outside of Docker.

It would sound like this is what Docker volumes are for, but volumes aren't available when building.

Our best recommendation so far is to get a shell prompt inside Docker, like this:

sudo docker run -it rspeer/conceptnet-full /bin/bash

Now you're inside the virtual system. Use a file transfer tool such as rsync to copy the data from /src/conceptnet/data to somewhere more useful.

If you have a better understanding of Docker and have a better recommendation on how to do this, please let us know on the conceptnet-users list.

Clone this wiki locally