{"id":903,"date":"2024-07-30T09:57:26","date_gmt":"2024-07-30T09:57:26","guid":{"rendered":"https:\/\/doublelayer.eu\/vilab\/?p=903"},"modified":"2024-07-30T14:52:09","modified_gmt":"2024-07-30T14:52:09","slug":"a-simple-recipe-for-making-an-apptainer-with-conda-ase-and-gpaw","status":"publish","type":"post","link":"https:\/\/doublelayer.eu\/vilab\/2024\/07\/30\/a-simple-recipe-for-making-an-apptainer-with-conda-ase-and-gpaw\/","title":{"rendered":"A simple recipe for making an apptainer with conda, ASE, and GPAW"},"content":{"rendered":"\n<p>At the Tartu HPC cluster I have a limit for number of files, which prevents me from having too many conda environments. So, after I have ruined my base environment, I decided to finally switch to Singularity\/Apptainer. Here is a simple recipe for creating an apptainer which is equivalent to standard conda installation. It is just an example. Note that AMD\/Intel optimized apptainers will run 10\u201320% faster than the conda one.<\/p>\n\n\n\n<p>P.S. I have ruined my base environment while trying to install XMGRACE, which is so much easier to use than writing a python code just to check calculations results.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Bootstrap: docker\nFrom: continuumio\/miniconda3\n\n%post\n    # Install necessary packages including InfiniBand support using apt\n    apt-get update &amp;&amp; \\\n    apt-get install -y infiniband-diags perftest ibverbs-providers libibumad3 libibverbs1 libnl-3-200 libnl-route-3-200 librdmacm1 lldpad libdapl2 libdapl-dev rdmacm-utils ibverbs-utils &amp;&amp; \\\n    apt-get install -y grace povray &amp;&amp; \\\n    rm -rf \/var\/lib\/apt\/lists\/*\n\n    # Configure conda\n    conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive\n    conda install -y python=3.11\n\n    # Install openmpi and ucx from conda\n    conda install -y -c conda-forge openmpi=4.1.6=*hc5af2df* ucx\n\n    # Install gpaw from conda\n    conda install -y -c conda-forge gpaw=24*=*openmpi*\n\n    # Install other packages\n    conda install -y -c conda-forge dftd4 dftd4-python\n\n    # Optionally, clean up Conda to reduce the image size\n    conda clean --all -f -y\n\n%environment\n    # Activate the base environment\n    source \/opt\/conda\/etc\/profile.d\/conda.sh\n    conda activate base<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>At the Tartu HPC cluster I have a limit for number of files, which prevents me from having too many conda environments. So, after I have ruined my base environment, I decided to finally switch to Singularity\/Apptainer. Here is a simple recipe for creating an apptainer which is equivalent to standard conda installation. It is&hellip; <a class=\"read-more\" href=\"https:\/\/doublelayer.eu\/vilab\/2024\/07\/30\/a-simple-recipe-for-making-an-apptainer-with-conda-ase-and-gpaw\/\">Read More<\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[53],"class_list":["post-903","post","type-post","status-publish","format-standard","hentry","category-know-how","tag-gpaw"],"_links":{"self":[{"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/posts\/903","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/comments?post=903"}],"version-history":[{"count":4,"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/posts\/903\/revisions"}],"predecessor-version":[{"id":907,"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/posts\/903\/revisions\/907"}],"wp:attachment":[{"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/media?parent=903"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/categories?post=903"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/tags?post=903"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}