Update environment-set-up.md

This commit is contained in:
Antreas Antoniou 2018-09-24 18:52:11 +01:00 committed by GitHub
parent 8280ace204
commit 6fc8ef3427
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,47 +16,8 @@ Conda can handle installation of the Python libraries we will be using and all t
There are several options available for installing Conda on a system. Here we will use the Python 3 version of [Miniconda](http://conda.pydata.org/miniconda.html), which installs just Conda and its dependencies. An alternative is to install the [Anaconda Python distribution](https://docs.continuum.io/anaconda/), which installs Conda and a large selection of popular Python packages. As we will require only a small subset of these packages we will use the more barebones Miniconda to avoid eating into your DICE disk quota too much, however if installing on a personal machine you may wish to consider Anaconda if you want to explore other Python packages.
# Choosing how to access conda:
To proceed please choose either step 2 or 3. Do not execute both steps. Choose the one that best works with your course selections / machine setup.
Choose step 2 if:
1. You are taking ANLP or IAML in addition to the MLP course or
2. Are using a DICE machine and would rather skip manual installation of conda
Choose step 3 if:
1. You are NOT taking ANLP or IAML along with MLP and
1. You are using your own PC or laptop and want to do a manual conda installation or
2. You are curious and want to learn how to install miniconda on your own (highly recommended)
Again, choose 2 OR 3, NOT BOTH.
## 2. Accessing conda via remote installation - SHOULD BE DONE BY ALL STUDENTS TAKING ANLP and IAML (along with MLP) courses
Instead of having to install conda via miniconda from scratch, one can also access conda via a remote installation that we have made for all students. This is especially important for those taking ANLP and IAML. This step is vital if you want to be able to access the modules from those courses.
```
nano ~/.bashrc
```
This opens the .bashrc file that is sourced whenever one starts a terminal.
Append at the end
```
source /group/teaching/conda/etc/profile.d/conda.sh
```
This should be enough to enable conda and give you access to your packages every time to open a terminal. Please continue from the 'Creating the Conda environment section' if you have taken this path.
Also, do not forget to run
```
source ~/.bashrc
```
In your current terminal session to get conda (automatic sourcing of .bashrc happens only when a new terminal is opened).
## 3. Installing Miniconda From Scratch - Only do this step if you have chosen not to do step 2
## 2. Installing Miniconda
We provide instructions here for getting an environment with all the required dependencies running on computers running
@ -123,7 +84,7 @@ Append at the end
source ~/.benv
```
## 4. Creating the Conda environment
## 3. Creating the Conda environment
You should now have a working Conda installation. If you run
@ -174,7 +135,21 @@ conda clean -t
These tarballs are usually cached to allow quicker installation into additional environments however we will only be using a single environment here so there is no need to keep them on disk.
## 5. Getting the course code and a short introduction to Git
***ANLP and IAML students only:***
To have normal access to your ANLP and IAML environments please do the following:
1. ```nano .condarc```
2. Add the following lines in the file:
```
envs_dirs:
- /group/teaching/conda/envs
pkgs_dirs:
- /group/teaching/conda/pkgs
- ~/miniconda3/pkgs
```
3. Exit by using control + x and then choosing 'yes' at the exit prompt.
## 4. Getting the course code and a short introduction to Git
The next step in getting our environment set up will be to download the course code. This is available in a Git repository on Github: