Skip to content

Latest commit

 

History

History
156 lines (107 loc) · 5.23 KB

README.org

File metadata and controls

156 lines (107 loc) · 5.23 KB

A Docker container for DELPH-IN tools

Introduction

If you want to run the full LOGON software infrastructure, including the LKB, [incr tsdb()] and associated tools, you curently need a Linux system with 32-bit compatibility mode enabled (http://moin.delph-in.net/LogonTop).

Moreover, other DELPH-IN tools such as the ACE parser, FFTB, Arbiter, art have their code available but build scripts documented and tested only to MacOS and Linux system.

This repository provides a docker-based solution for users that:

  1. Want to use/experiment with DELPH-IN tools keeping all the instalation of DELPH-IN tools isolated from their main system.
  2. Users of other platforms that are not supported by the DELPH-IN tools.

Docker is a super-light virtualization engine that allows the creation and execution of small VMs that contain the barely minimum needed to run the desired programs. These small virtual machines are called “images”. Docker images run in “containers”, which are running instances of a VM. The graphical display is redirected to an X11 server (XQuartz) on your macOS machine. The Dockerfile creates a Linux image with all LOGON requirements (which are basically emacs, plus some X11 and rendering libraries) and the `logon.sh` script takes care of the needed display redirections and volume mappings.

Besides all the LOGON distribution that can easly be checked out in your HOST folder (by default we assume ~/hpsg) and used inside the container. The image produced by the Dockerfile also install:

  • ace
  • fftb
  • art
  • mkprof
  • arbiter
  • LinGO Grammar Matrix

All these tools can also be obtained compiled for Linux only in http://sweaglesw.org/linguistics/acetools/. But the `fftb/web.c` needs a tiny modification to proper accept requests from the port exposed to the host system. Curently, we have modified copy of this file in this repository.

(the image/Dockerfile ended up providing a detailed step-by-step to the compilation of all ACE-dependent tools we support.)

The logon.sh script also export the port 8080 to the host 8080. So one can start the www server (http://moin.delph-in.net/LogonOnline) and access it from your browser in the host http://localhost:8080/logon.

Another benefits of a docker is that a user can also commit the stage of a container running saving it in another image:

https://docs.docker.com/engine/reference/commandline/commit/

Instalation

  1. Basics

    a) Install docker from www.docker.com.

    b) The VM will redirect the output windows to the X-windows server in the host OSX. Thus, you need to install an X11 server in you mac. Go to https://www.xquartz.org/, download the .dmg and install normally.

  2. Launch docker engine

    For docker VMs to be able to run, the docker engine must be running. Go to “Applications” and launch it.

  3. Build the image

    Next step is loading the image of your VM into your docker engine. You need to do this only once.

    To build the image, you need a “Dockerfile” as the one located in image/Dockerfile in this folder. Then, just execute:

    docker build -t logon image

    This will create an image named ‘logon’ using the Dockerfile in folder ‘image’.

    1. Install logon in the $HOME/hpsg folder of your HOST system.

      Follow the instructions in http://moin.delph-in.net/LogonInstallation to get a copy of logon tree, and an appropriate .bashrc and .emacs in your $HOME/hpsg folder. You need to do this only once.

      The $HOME/hpsg folder on your host system will be mounted in the image as the $HOME folder of the default user called ‘user’.

Execution

Once your image is created, you can run logon anytime with two simple steps:

  1. Make sure docker engine is running

    It will be probably launched by default at startup, so you don’t need to do anything. If it is not (no little whale blowing in the top panel), go to “Applications” and launch it.

  2. Launch VM and run logon

    To launch the VM, simply execute the script:

    ./logon.sh

    You will get the prompt for the VM shell, where you can type

    emacs

    and from there, proceeed normally (M-x logon, etc.)

    The script ‘logon.sh’ takes care of several tuning steps needed to run the VM, related to redirecting logon windows to OSX X11 manager and making your $HOME folder (which contains the logon tree) visible from inside the VM. Check the comments inside to find out details about what is it doing.

    ACE tools are installed in the /usr/local/bin.

    IMPORTANTE: You will also need to set up the LOGNAME environment variable to a string containg the username you want to register in the profile as the annotator.

Starting the Matrix

start the apache2 service with the command below, password of “user” is “user”.

sudo service apache2 start

License

See the LICENSE file. Note that this repository contains a Dockerfile that downloads and installs other third part systems into a Linux system image. The licenses of those systems should also be considered. Please consult them at: