by Roberto Innocente <inno at sissa.it>
QuantumEspresso is a suite of packages for the calculations of electronic structure and materials modeling.
Today, many apps, and with them also QuantumEspresso can be run conveniently
in a virtual environment, insulated from the machine and the software of the machine that hosts them.
Most of you are already aware of virtual machines and the way to use them. Virtual machines are supported by Full Virtualization : a program called hypervisor pretends to be a bare machine and so can load over itself any operating system.
There is a more lightweight sort of virtualization that reached maturity later on Linux and became popular in the last years :
With this virtualization the Linux os keeps insulated the activities in containers ( the equivalent of a VM in this context).
In this case the programs inside the container use the operating system services of the host and so they can't be apps for another os.
The good of this is that each process of the containers is a process of the host and so there is almost no penalty associated with this.
Furthermore for all the containers there is only one host os to take care of.
The most popular tool to provide os-level virtualization on Linux is Docker .
runs containers formed according to
The docker image for QuantumEspresso is very large ( up to 2 GB or more).
In any case prepare a sufficient space on disk, checking :
On Linux :
df /var/libgives you not enough space you can create $HOME/docker and make a symbolic link from /var/lib/docker to your dir.
On Windows :
On Mac : ?
Docker engine is the new way to call the client/server application once simply called docker and made of :
$ curl -L https://github.com/docker/machine/releases/download/v0.9.0/docker-machine-`uname -s`-`uname -m` >/tmp/docker-machine && chmod +x /tmp/docker-machine && sudo cp /tmp/docker-machine /usr/local/bin/docker-machine
If you have a Mac: install ssh , Docker Toolbox :
If you have Windows : install putty , Docker Toolbox :
is installed along the
on Win and Mac and so there is no need for a separate installation.
Even if Docker is relatively recent, there is now a plethora of different docker versions.
You should install it on Linux machines. For the other platforms is part of the Toolbox. Requires a Linux kernel at least 3.10. It uses the native Linux containers (cgroup/namespace) of the host.
On Ubuntu 16.04 install it with :
sudo apt update sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual sudo apt install -yq apt-transport-https ca-certificates sudo echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" >>/etc/apt/sources.list sudo apt-key add \ --keyserver hkp://p80.pool.sks-keyservers.net:80 \ --recv-keys 58118E89F3A912897C070ADBF76221572C52609D sudo apt update sudo apt-cache policy docker-engine sudo apt install -yq docker-engine sudo service docker start sudo groupadd docker sudo usermod -aG docker *your_username*
On Centos 7.X :
sudo yum update sudo yum update sudo tee /etc/yum.repos.d/docker.repo <<-'EOF' [dockerrepo] name=Docker Repository baseurl=https://yum.dockerproject.org/repo/main/centos/7/ enabled=1 gpgcheck=1 gpgkey=https://yum.dockerproject.org/gpg EOF sudo yum install docker-engine sudo systemctl enable docker.service sudo systemctl start docker sudo groupadd docker sudo usermod -aG docker **your_username**
For other OS, Docker developed a Linux microkernel (
), that can run the docker daemon and containers and is installable over a
( in particular it will install
This is the legacy solution that, for the time being, I suggest you to use if you don’t run Linux. Here the instructions for Mac and Win :
Recently Docker released new versions of docker based on OS specific hypervisor (
MacOS and Windows, it called them Docker for Mac and Docker for Windows .
I suggest you don’t try first these two new solutions.
Requires a Mac produced after 2010 with processor supporting ept and unrestricted mode .
Requires at least 4 GB RAM.
Requires macOS at least Yosemite 10.10.3, but better ElCapitan 10.11 or newer .
This version uses a Mac specific Hypervisor : HyperKit ( based on xhyve ) .
Requires 64 bit Windows 10 Pro/Enterprise/Student Edition (November update 1511, build at least 10586).
Uses Hyper-V on Windows 10.
The last beta version can run both Linux and Windows containers.
Some QuantumEspresso images are available on the standard registry/repository https://hub.docker.com/r/rinnocente . You can list them with :
$ docker search rinnocente
In particular, for QE version 6.0, images available are :
You can use locally the container without logging in typing :
$ docker run -it -u qe rinnocente/qe-full-6.0 /bin/bash
in this way you will be inside the container as user
If you want to access directly the container from outside your machine or you want to share the container with collaborators, then you have to start it in background with a running sshd .
You can run the container in background with sshd typing :
$ CONT=`docker run -P -d -t rinnocente/qe-full-6.0` $ PORT=`docker port $CONT 22 |sed -e 's#.*:##'` $ ssh -p $PORT email@example.com
Change the password that initially is set to mammamia , with the passwd command.
More information available at dockerhub : https://hub.docker.com/r/rinnocente/qe-full-6.0/ or at github https://github.com/rinnocente/qe-full-6.0