{"id":254,"date":"2024-06-15T22:51:29","date_gmt":"2024-06-15T21:51:29","guid":{"rendered":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/?p=254"},"modified":"2024-06-16T10:34:48","modified_gmt":"2024-06-16T09:34:48","slug":"multi-user-conda-environments-a-worked-example-installing-qiime2-amplicon","status":"publish","type":"post","link":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/2024\/06\/15\/multi-user-conda-environments-a-worked-example-installing-qiime2-amplicon\/","title":{"rendered":"Multi-user Conda environments: a worked example installing QIIME2 Amplicon"},"content":{"rendered":"\n<p>QIIME2 Amplicon occupies 15GB on disk, so you don&#8217;t really want each user installing it in their own home directory because of the amount of space that multiple parallel installations will consume. It also takes a long time to install, which is not as pleasant a user experience as having it already there for immediate use.<\/p>\n\n\n\n<p>The following guide is written using a Debian system. The only step that ought to differ between Debian-like and RedHat-like systems is the first step: installing Conda itself.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Systems administrators&#8217; guide<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1: Install Conda<\/h3>\n\n\n\n<p>Become root, then follow along with <a href=\"https:\/\/conda.io\/projects\/conda\/en\/latest\/user-guide\/install\/rpm-debian.html\">https:\/\/conda.io\/projects\/conda\/en\/latest\/user-guide\/install\/rpm-debian.html<\/a> to add the Miniconda package repository to your computer and then run <code>apt install conda<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2: Share the multi-user environments with your users<\/h3>\n\n\n\n<p>Create \/opt\/conda\/.condarc containing:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>channels:\n  - defaults\npkg_dirs:\n  - \/shared\/conda\/pkgs\n  - $HOME\/.conda\/pkgs\nenvs_dirs:\n  - \/shared\/conda\/envs\n  - $HOME\/.conda\/envs<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3: Install QIIME2 Amplicon<\/h3>\n\n\n\n<p>Fetch the Conda environment definition for QIIME2 Amplicon: <code>wget https:\/\/data.qiime2.org\/distro\/amplicon\/qiime2-amplicon-2024.5-py38-linux-conda.yml<\/code> then review qiime2-amplicon-2024.5-py38-linux-conda.yml to make sure that it&#8217;s going to behave benignly towards your system.<\/p>\n\n\n\n<p>Once you are happy: <code>conda env create -p \/opt\/conda\/envs\/qiime2-amplicon-2024.5 --file qiime2-amplicon-2024.5-py38-linux-conda.yml<\/code> and wait for a long time. The use of <code>-p<\/code> differs from the official QIIME2 installation instructions and is the &#8220;special sauce&#8221; that puts the QIIME2 environment into a shared location, \/opt\/conda\/envs, instead of \/root\/.conda\/envs. <\/p>\n\n\n\n<p>Test the QIIME2 installation by dropping back into an unprivileged account and following the Users&#8217; guide below.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Users&#8217; guide<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">My sysadmin installed QIIME2. How do I access it?<\/h3>\n\n\n\n<p>Start with: <code>source \/opt\/conda\/etc\/profile.d\/conda.sh<\/code>. You can put that in your .bashrc\/.zshrc\/whatever-your-profile-file-is-called to run every time you login.<\/p>\n\n\n\n<p><code>conda env list<\/code> should get you a list containing qiime2-amplicon-2024.5 and the following should show you some information about your QIIME2 installation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>conda activate qiime2-amplicon-2024.5\nqiime info<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">How do I use QIIME2?<\/h3>\n\n\n\n<p>I am not a bioinformaticist so I cannot help you there.  <a href=\"https:\/\/docs.qiime2.org\/2024.5\/\">https:\/\/docs.qiime2.org\/2024.5\/<\/a> has some tutorials.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>QIIME2 Amplicon occupies 15GB on disk, so you don&#8217;t really want each user installing it in their own home directory because of the amount of space that multiple parallel installations will consume. It also takes a long time to install, which is not as pleasant a user experience as having it already there for immediate &hellip; <a href=\"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/2024\/06\/15\/multi-user-conda-environments-a-worked-example-installing-qiime2-amplicon\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Multi-user Conda environments: a worked example installing QIIME2 Amplicon&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1447,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,18],"tags":[],"class_list":["post-254","post","type-post","status-publish","format-standard","hentry","category-gnulinux","category-python"],"_links":{"self":[{"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/posts\/254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/users\/1447"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/comments?post=254"}],"version-history":[{"count":11,"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":271,"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/posts\/254\/revisions\/271"}],"wp:attachment":[{"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/media?parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/categories?post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/tags?post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}