When starting a new developing environment for AiiDA/AiiDAlab. There are many choices, e.g., conda, docker, VM. In this post, I’d like to share my firsthand experience using the AiiDAlab Docker image in the hope that my insights can benefit others.
Creating a New Profile
To begin, we’ll create a new profile named ‘dev-aiidalab’ using the ‘aiidalab-launch’ :
aiidalab-launch profile add --image aiidalab/qe:edge dev-aiidalab
Installing Packages as Root Inside the Docker Container
docker exec -it -u root xxx_container_id /bin/bash
Inside the container, you can update the package list and install any necessary packages. For instance, if you require ‘plocate’ for ‘pgtest,’ you can run:
sudo apt update
# used for pgtest
sudo apt install plocate
More insights and tips will be added shortly.
RabbitMQ
If you want to use the verdi devel rabbitmq
command to interact with RabbitMQ.
# rabbitmq is installed in a separate conda environment.
conda activate aiida-core-services
rabbitmq-plugins enable rabbitmq_management
conda deactivate
Github gh command
conda install -c conda-forge gh
Login your github account
gh auth login
Backup
In some cases, the container can not start anymore due to unknown reasons. Don’t worry that your data is still there. Typically, it is In the folder
/var/lib/docker/volumes/aiidalab_dev-aiida_home/_data/
You can backup this data, reset the profile
aiidalab-launch reset -p dev-aiida
and create a new profile again.
Share Your AiiDAlab Docker Experience
If you have any experiences or insights to share regarding the AiiDAlab Docker environment, please feel free to contribute by adding a comment below. Your input can be invaluable to the community.