Skip to content

Latest commit

 

History

History
78 lines (48 loc) · 2.72 KB

Anaconda Installation.md

File metadata and controls

78 lines (48 loc) · 2.72 KB

Installation Instructions

Install the Anaconda distribution, then open Anaconda prompt.

Using environment.yaml

  1. Download the [environment.yaml] from existing installation, if available.

  2. In Anaconda prompt, navigate to the directory containing the environment.yaml and write conda env create -f environment.yaml.

  3. Activate the new environment with conda activate ml.

  4. Move onto the Installation of PyTorch section.

Using requirements.txt

See here for more detailed guide of steps 1-2, 5-7.

  1. Create a new Python environment with conda create -n ml python=3.8.5 anaconda.

  2. Activate the new environment with conda activate ml.

  3. Navigate to directory containing the requirements.txt of this repository.

requirements.txt

elasticsearch==7.10.0
farm-haystack==0.7.0
kaggle==1.5.12
nltk==3.5
numpy==1.19.2
pandas==1.1.5
rouge==1.0.0
seaborn==0.11.1
transformers==4.1.1
sentence-transformers==1.1.0
spacy==3.0.6
spacy-transformers==1.0.2
flair==0.8
tensorflow==2.5.0
ipykernel==5.5.5
  1. Write pip install -r requirements.txt.

  2. Move onto the Installation of PyTorch section.

Installation of PyTorch

  1. Open the PyTorch installation page.

  2. Select your specifications. If using GPU, follow instructions in Enable GPU section below first. Otherwise, under CUDA, select None.

  3. Copy the given command and run it in Anaconda prompt.

Enable GPU

If you have a CUDA enabled GPU, you can take advantage of GPU acceleration. If you already have CUDA installed, skip steps 1-3.

  1. Install a NVIDIA GPU driver from here.

  2. Install CUDA toolkit, this course originally used version 11.1 but feel free to use a more recent version that is displayed here under CUDA.

  3. Install cuDNN.

  4. Confirm installation by writing nvcc --version in Anaconda prompt, the CUDA version should appear (such as cuda_11.1).

  5. Once complete, install PyTorch using instructions in Installation of PyTorch section above.

Adding to Jupyter

Once your environment is setup, it can be added as a kernel to Jupyter lab/notebook by:

  1. In Anaconda prompt write conda active ml.

  2. Then write python -m ipykernel install --user --name ml --display-name "ML"

  3. The kernel has been installed, switch back to base with conda activate base then open Jupyter with jupyter lab/jupyter notebook.