Skip to content

Commit

Permalink
Added some discussion of HPC specific issues to the teaching guide
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrpugh committed Jun 17, 2019
1 parent 3cf2260 commit 11ae6c7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
10 changes: 5 additions & 5 deletions _episodes/02-working-with-environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ objectives:
keypoints:
- "A Conda environment is a directory that contains a specific collection of Conda packages that you have installed."
- "You create (remove) a new environment using the `conda create` (`conda remove`) commands."
- "You activate (deactivate) an environment using the `conda activate` (`conda deactivate`) commands."
- "You activate (deactivate) an environment using the `source activate` (`conda deactivate`) commands."
- "You should install each environment as a sub-directory inside its corresponding project directory"
- "Use the `conda env list` command to list existing environments and their respective locations."
- "Use the `conda list` command to list all of the packages installed in an environment."
Expand Down Expand Up @@ -306,7 +306,7 @@ environments in your `~/miniconda3/env/` folder, you’ll have to give each of t
>
> ~~~
> $ cd my-project/
> $ conda activate ./env
> $ source activate ./env
> ~~~
> {: .language-bash}
{: .callout}
Expand Down Expand Up @@ -374,7 +374,7 @@ you do not. Now your command prompt will display the active environment’s gene
~~~
$ cd project-directory
$ conda activate ./env
$ source activate ./env
(env) project-directory $
~~~
{: .language-bash}
Expand All @@ -389,10 +389,10 @@ For more on modifying your `.condarc` file, see [the docs][conda-docs].
> > ## Solution
> >
> > You can activate an existing environment by providing the path the the environment directory
> > instead of the environment name when using the `conda activate` command as follows.
> > instead of the environment name when using the `source activate` command as follows.
> >
> > ~~~
> > $ conda activate ./env
> > $ source activate ./env
> > ~~~
> > {: .language-bash}
> >
Expand Down
2 changes: 1 addition & 1 deletion _episodes/03-sharing-environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ task.
~~~
$ cd project-dir
$ conda env create --prefix ./env --file environment.yml
$ conda activate ./env
$ source activate ./env
~~~
{: .language-bash}
Expand Down
22 changes: 21 additions & 1 deletion _extras/guide.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
---
title: "Instructor Notes"
---
FIXME

## Conda on HPC systems

Many HPC systems make either Miniconda or Anaconda (or both!) available to users via
[Environment Modules](http://modules.sourceforge.net/). In this case a user will need to load the
relevant module instead of installing Conda.

~~~
$ module load miniconda
~~~
{: .language-bash}

> ## Avoid running the `conda init` command
>
> Using the `conda init` command is not advisable on HPC systems that use Environment Modules
> to make Miniconda or Anaconda available to users. The reason is that running the `conda init`
> command makes changes to a user's `~/.bashrc` file. If the user subsequently forgets to reverse
> these changes using `conda init --reverse`, then `conda` will still be available even after
> unloading or purging the `miniconda` module. This opens the distinct possibility of a user
> accidently leaving his/her shell environment in an unexpected state.
{: .callout}

{% include links.md %}

0 comments on commit 11ae6c7

Please sign in to comment.