diff --git a/content/Applications/Using_Your_Own_Software/using_anaconda_package_manager.md b/content/Applications/Using_Your_Own_Software/using_anaconda_package_manager.md index 14526a4fcdefcc30bce61d579d2dd8187e67c043..b1a70522af96aa2b3fe9554024d41a25fdf717b3 100644 --- a/content/Applications/Using_Your_Own_Software/using_anaconda_package_manager.md +++ b/content/Applications/Using_Your_Own_Software/using_anaconda_package_manager.md @@ -89,7 +89,7 @@ If the package is available, this will also display available package versions and compatible Python versions the package may be installed under. -### Creating Custom Anaconda Environment +### Creating Custom Anaconda Environments The `create` command is used to create a new environment. It requires at a minimum a name for the environment, and at least one package to @@ -113,14 +113,25 @@ To use the environment, we must first *activate* it. {{% panel theme="info" header="Activate environment" %}} {{< highlight bash >}} -source activate mynumpy +conda activate mynumpy {{< /highlight >}} {{% /panel %}} Our new environment is now active, and we can use it. The shell prompt will change to indicate this as well (this can be disable if desired). -### Creating Custom GPU Anaconda Environment +To use your environment in a job, add the lines + +{{% panel theme="info" header="Use your environment in a SLURM job" %}} +{{< highlight bash >}} +module load anaconda +conda activate mynumpy +{{< /highlight >}} +{{% /panel %}} + +to the beginning of your submit script (replacing `mynumpy` with your environment's name). + +### Creating Custom GPU Anaconda Environments We provide GPU versions of various frameworks such as `tensorflow`, `keras`, `theano`, via [modules](../module_commands). However, sometimes you may need additional libraries or packages that are not available as part of these modules. In this case, you will need to create your own GPU Anaconda environment. @@ -142,7 +153,7 @@ This will create a new `tensorflow-gpu-1.12-custom` environment in your home dir {{% panel theme="info" header="Install new packages in the currently active environment" %}} {{< highlight bash >}} module load anaconda -source activate tensorflow-gpu-1.12-custom +conda activate tensorflow-gpu-1.12-custom conda install <packages> {{< /highlight >}} {{% /panel %}} @@ -150,11 +161,11 @@ conda install <packages> Next, whenever you want to use this custom GPU Anaconda environment, you need to add these two lines in your submit script: {{< highlight bash >}} module load anaconda -source activate tensorflow-gpu-1.12-custom +conda activate tensorflow-gpu-1.12-custom {{< /highlight >}} {{% notice info %}} -If you have custom GPU Anaconda environment please only use the two lines from above and **DO NOT** load the module you have cloned earlier. Using `module load tensorflow-gpu/py36/1.12` and `source activate tensorflow-gpu-1.12-custom` in the same script is **wrong** and may give you various errors and incorrect results. +If you have custom GPU Anaconda environment please only use the two lines from above and **DO NOT** load the module you have cloned earlier. Using `module load tensorflow-gpu/py36/1.12` and `conda activate tensorflow-gpu-1.12-custom` in the same script is **wrong** and may give you various errors and incorrect results. {{% /notice %}} @@ -236,7 +247,7 @@ Jupyter Notebook. To do so, follow the steps below, replacing 2. Using the command-line environment, load the target conda environment: - {{< highlight bash >}}source activate myenv{{< /highlight >}} + {{< highlight bash >}}conda activate myenv{{< /highlight >}} 3. Install the Jupyter kernel and add the environment: