-
Notifications
You must be signed in to change notification settings - Fork 15
Running Semantic Synchrony and Emacs in a single Docker container
NOTE: Depending on how you install Docker, you might have to append sudo
to each of the docker commands below. For instance, if it says to run docker ps
, you will have to run sudo docker ps
instead.
First, install Docker.
Next, "pull" the smsn-emacs-too image from DockerHub to your computer, by starting a terminal and running docker pull jeffreybbrown/smsn-emacs-too
. Now you have the code, a.k.a. the "Docker image".
Before you can start a Docker "container" running the image, you'll need to create a folder where smsn should keep your graph. Suppose the path leading to that folder is /PATH/TO/YOUR/KNOWLEDGE-BASE
. In that case, you would run docker run -it -v /PATH/TO/YOUR/KNOWLEDGE-BASE:/mnt/smsn-data jeffreybbrown/smsn-emacs-too
. Now you are running a Docker container, and it's running the Semantic Synchrony server.
The window you did that from is now dedicated to displaying Semantic Synchrony-related messages. Open a new terminal window, and find the name(s) of the process you just started, by running docker ps
. You should see something like this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c90aeafdfe3e jeffreybbrown/smsn-develop "/root/gremlin/sta..." 2 days ago Up 2 days 0.0.0.0:8182->8182/tcp pensive_northcutt
The last step is to start the front end. First, start a bash shell in the container. To do that, run docker exec -it NAME bash
, where instead of NAME
you put either the container ID ("c90aeafdfe3e" in this example) or the randomly-generated container name ("pensive_northcutt" in this example). If the prompt changed, then you are now "in" the container. Run emacs
. You should see the Emacs splash screen. Last, from within Emacs, run M-x smsn
. (M-x
probably means Alt-x
, but it's different on some systems.) If the screen turns blue, it's working.
Exit Emacs by, from within it, running M-x kill-emacs
. Exit the bash shell in the docker container by running exit
. At this point you've still got one window open that's showing a lot of Semantic Synchrony messages. You can quit that window by pressing `Ctrl-C from within it.
Semantic Synchrony uses fonts of different colors to indicate different sources for the notes. For instance, the notes from my personal graph are (mostly) yellow, while the notes from my public graph are (mostly) green. Initially, you probably won't care about the difference.
Semantic Synchrony changes the cursor color to indicate which submode the user is in: A black cursor indicates the "edit submode", and a green one indicates "move submode". From within Docker, the cursor is outside of our control. However, when you switch modes, a message will appear at the bottom of the screen indicating that you did. (If you're ever unsure which mode you're in, try pressing one of the keys i
, j
, k
or l
. If that moves the cursor, you're in move-submode; if it prints a character, you're in edit-submode.)