Docker container (base) for the converter software
This directory contains all the files needed to create the base Docker image used for the converter software in projects
.
A specific project's translation script can be executed either in an app like manner (I.O.U. a link to the anchor here), calling it directly from within the container, using a local copy executed by the container (I.O.U. a link to the anchor here), or in an interactive shell within the container (I.O.U. a link to the anchor here).
Building & running the Docker container
This is a quick tour on how to build and run the Docker container through different scenarios. This is not a lecture on containerisation in general, nor Linux/ Unix, shell scripting or programming. But if you encounter a specific problem, feel free to ping the MA team.
This section describes three use cases of the Docker container (including a build-how to per use case) but starts with a short primer of what is common to all scenarios described here.
Prerequisites
For building the Docker image, you need a local copy of the Git repository. After that, this guide assumes you are in the projects
subdirectory (we skip the output of the commands here):
$ git clone https://git.scicore.unibas.ch/schwede/modelcif-converters.git modelcif-converters.git
$ cd modelcif-converters.git/projects
$
Since the Docker container will run as a dedicated, non-root user, it is advisable to create this user with the ID of your local user. That way, file permission issues will be avoided. Get your user ID with the following command and note it down - it will be needed in the build steps:
$ whoami
localuser
$ id
uid=12345(localuser) ...
$
Look for the uid
in the output of id
. In the example above, 12345
is the ID of user localuser
, currently logged in and executing the commands.
One last thing that is needed for the example runs of the Docker container is data. For simplicity, we assume that a directory /home/user/models
exists on the local computer executing a converter, full of modelling data.