This page relates to if users wish to install Miniconda3 locally, instead of using the provide module on our clusters.
Can I Install Miniconda3 Locally?
Yes. You can install miniconda3 (and other applications) yourself. There is nothing wrong or against policy with this.
If you do install it, please make sure you:
understand what you are doing.
how it affects your environment.
and track/record what you’ve done and why.
Since you are intentionally effecting your environment, you need to take a level of responsibility to mange and work with this.
Should I Install Miniconda3 Locally?
Ask yourself “what does a local installation benefit me over using the provided miniconda3 module?”
There might be reasons why you might need to install this yourself, just make sure you can communicate why, and that you understand what you are doing to your environment and take responsibility for this.
If you can not answer this, then use the version that ARCC provides as a module
.
If you can answer this, please be prepared to answer the next question.
Why Did You Install Miniconda3?
If you ask ARCC a question related to conda environments and we see that you have installed miniconda3 yourself, the first question we will as is “why did you install this yourself?”
If you can not answer this, then ARCC will suggest that your uninstall this and use the provide miniconda3 module.
We support this module and understand how it should be working and can typically resolve your issues.
How Do I Know if Miniconda3 Has Been Installed Locally?
You should notice that you command prompt has changed when you start a new session.
Notice the difference:
Not Installed:
[<username>@mblog2 ~]$
Installed:
(base) [<username>@mblog1 ~]$
Notice how the (base)
miniconda3 environment is activated.
Also notice that your .bashrc
file has been updated with something of the form:
# >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/home/<username>/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__conda_setup" else if [ -f "/home/<username>/miniconda3/etc/profile.d/conda.sh" ]; then . "/home/<username>/miniconda3/etc/profile.d/conda.sh" else export PATH="/home/<username>/miniconda3/bin:$PATH" fi fi unset __conda_setup # <<< conda initialize <<<
I Didn’t Install This?
Applications do not install themselves - there is a process that you would have followed. See the first question.
How Do I Remove My Local Installation?
Step 1: Edit your .bashrc
script and remove everything between:
# >>> conda initialize >>> ... # <<< conda initialize <<<
Step 2: Remove the miniconda3
folder from your home, or where ever you installed it.
(base) [salexan5@mblog1 ~]$ rm -rf miniconda3/
Step 3: On the start of your next session, the command prompt should return to normal:
[<username>@mblog2 ~]$
Job Submission Error
We can not guarantee that what ever conda environments you have activate on the login nodes will be inherited when you submit a job using sbatch
.
You will errors of the form:
# Within Submission Script: ... conda activate <path-to-conda-environment> ...
within the slurm output you will see:
... CondaError: Run 'conda init' before 'conda activate' ...
ARCC Recommendation
ARCC recommends using the versions of miniconda3 provided as a module, and use a submission script of the form:
... module purge module load miniconda3/<version> conda activate <path-to-conda-environment> ...
ARCC Related Conda Workshops
Before moving forward, ARCC has the following workshops
Intro to Using Conda - beginners.
Using Python, Conda and Pip on the Cluster - intermediate level.
We would highly recommend working through at least the first one to understand how to use conda effectively.