Run mantid in Docker.
MantidPlot:
docker run \
--rm \
--ipc=host \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
mantidproject/mantid:3.13.0_ubuntu16.04 \
mantidplot
Note that the instrument view does not work using this method.
Mantid Python:
docker run \
--rm -it \
mantidproject/mantid:3.13.0_ubuntu16.04 \
mantidpython
x11docker can be used to enable advanced graphics features (instrument view, VSI, etc.) and is the only way to run the new workbench:
x11docker \
--hostipc \
--xpra \
mantidproject/mantid /
mantidplot
You will more than likely want to assign some volumes to access data too.
If your deploying to Rancher OS use the following alias to use git:
alias git="docker run -ti --rm -v $(pwd):/git alpine/git"
After doing a git clone you will need to re-run the alias to update the working dir:
alias git="docker run -ti --rm -v $(pwd):/git alpine/git"
git clone https://github.com/mantidproject/dockerfiles.git
alias git="docker run -ti --rm -v $(pwd):/git alpine/git"
git status
The following tags are available:
nightly
- Most recent nightly build with CentOS 7 base imagenightly_centos7
- Most recent nightly build with CentOS 7 base imagenightly_ubuntu16.04
- Most recent nightly build with Ubuntu 16.04 (xenial) base imagenightly_ubuntu16.04_python3
- Most recent nightly build with Python 3 support with Ubuntu 16.04 (xenial) base imagelatest
- Latest release with CentOS 7 base imagelatest_centos7
- Latest release with CentOS 7 base imagelatest_ubuntu16.04
- Latest release with Ubuntu 16.04 (xenial) base imagex.y.z
- Release x.y.z with CentOS 7 base imagex.y.z_centos7
- Release x.y.z with CentOS 7 base imagex.y.z_ubuntu16.04
- Release x.y.z with Ubuntu 16.04 (xenial) base image
See here For a full list.
This details how to build images. This is mostly intended for developers maintaining the images.
If any part of these steps is unclear don't push anything you create to DockerHub under the mantidproject
organisation.
By all means build images but make sure you have done what you expected to do before pushing anything.
All images can built as a single script by running scripts/build_all.sh
this also has the advantage of making sure the images are built in the correct order, for example if the developer images are updated
scripts/push_all.sh
will push all locally tagged images. It's important to make sure build_all.sh
has run before and that the images are what you expect.
TODO
This should mainly be done by Jenkins, but if for some reason it must be done manually follow these steps (this assumes you are using Bash):
- Download the binary from the nightly build you want to package, place it in this directory (the one with the
*.Dockerfile
s). - Load the build helpers:
. build_helpers.sh
- Build the image:
build_image [dockerfile] [tag] [package file] [path additions]
[dockerfile]
is the Dockerfile used to build the image, it should be one from this directory[tag]
is the tag to apply to the image, this should follow the format described in the section above[package file]
is the filename of the package you downloaded in step 1[path additions]
is a list of paths to add to thePATH
environment variable, this should be set according to the target OS and nightly type
The jenkins_build_nightly.sh
script can be inspected to see how this should work automatically.
This script should be enough to give you some hints if anything is unclear.