This repository provides a Docker environment for building Quantum ESPRESSO from the official QEF GitLab repository.
Source repository: https://gitlab.com/QEF/q-e
To generate the Quantum ESPRESSO pw.x input files use this app https://qe-input-pwi-generator.streamlit.app/
Docker is required to build and run this image.
Install Docker Desktop for Mac from the official Docker website: https://docs.docker.com/desktop/setup/install/mac-install/
Install Docker Desktop for Windows from the official Docker website: https://docs.docker.com/desktop/setup/install/windows-install/
After installation, open Docker Desktop and wait until Docker is running.
After installing docker Clone this repository:
git clone https://github.com/hrehmaan/qe-docker.gitMove to qe-docker folder
cd qe-docker
Build the Docker image:
docker build -t quantum-espresso .docker run -it -v $(pwd):/root/shared --rm -w /root/shared quantum-espressoOR - in widows powershell
docker run -it -v ${PWD}:/root/shared --rm -w /root/shared quantum-espresso
The repository includes a demo input file:
demo/espresso.pwi
To run the demo, first start the Docker container:
docker run -it -v $(pwd):/root/shared --rm -w /root/shared quantum-espressoOR - in widows powershell
docker run -it -v ${PWD}:/root/shared --rm -w /root/shared quantum-espresso
Then inside the container:
cd demoRun the demo with:
pw.x < espresso.pwi | tee espresso.outThis runs Quantum ESPRESSO and saves the output to espresso.out while also showing it in the terminal.
Alternatively, if using MPI:
mpirun -np N pw.x < espresso.pwi > espresso.outN is the number of cores, eg: 2,3,4,5,...
After the run finishes, check:
grep "JOB DONE" espresso.outIf the Docker build fails because of network, DNS, or registry connection problems, you can try configuring Docker's daemon settings.
Create or edit Docker's daemon.json file and add:
{
"builder": {
"gc": {
"defaultKeepStorage": "20GB",
"enabled": true
}
},
"dns": ["8.8.8.8", "8.8.4.4"],
"registry-mirrors": ["https://mirror.gcr.io"]
}After saving the file, restart Docker and build again:
docker build --no-cache -t quantum-espresso .On Linux, the file is usually located at:
/etc/docker/daemon.json
On Docker Desktop, you can usually edit it from:
Docker Desktop → Settings → Docker Engine
Then paste or modify the JSON configuration there and restart Docker.
The image currently builds Quantum ESPRESSO from the develop branch.
For reproducible research, using a fixed Quantum ESPRESSO release tag is recommended.