Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Readme (Comprehensive Installation Steps) #738

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 108 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,66 +6,145 @@ This notebook repository now has a [companion website](https://atcold.github.io/
[🇬🇧](https://github.com/Atcold/pytorch-Deep-Learning/blob/master/README.md)   [🇨🇳](https://github.com/Atcold/pytorch-Deep-Learning/blob/master/docs/zh/README-ZH.md)   [🇰🇷](https://github.com/Atcold/pytorch-Deep-Learning/blob/master/docs/ko/README-KO.md)   [🇪🇸](https://github.com/Atcold/pytorch-Deep-Learning/blob/master/docs/es/README-ES.md)   [🇮🇹](https://github.com/Atcold/pytorch-Deep-Learning/blob/master/docs/it/README-IT.md)   [🇹🇷](https://github.com/Atcold/pytorch-Deep-Learning/blob/master/docs/tr/README-TR.md)   [🇯🇵](https://github.com/Atcold/pytorch-Deep-Learning/blob/master/docs/ja/README-JA.md)   [🇸🇦](https://github.com/Atcold/pytorch-Deep-Learning/blob/master/docs/ar/README-AR.md)   [🇫🇷](https://github.com/Atcold/pytorch-Deep-Learning/blob/master/docs/fr/README-FR.md)   [🇮🇷](https://github.com/Atcold/pytorch-Deep-Learning/blob/master/docs/fa/README-FA.md)   [🇷🇺](https://github.com/Atcold/pytorch-Deep-Learning/blob/master/docs/ru/README-RU.md)   [🇻🇳](https://github.com/Atcold/pytorch-Deep-Learning/blob/master/docs/vi/README-VI.md)   [🇷🇸](https://github.com/Atcold/pytorch-Deep-Learning/blob/master/docs/sr/README-SR.md)   [🇵🇹](https://github.com/Atcold/pytorch-Deep-Learning/blob/master/docs/pt/README-PT.md)


# Getting started

To be able to follow the exercises, you are going to need a laptop with Miniconda (a minimal version of Anaconda) and several Python packages installed.
The following instruction would work as is for Mac or Ubuntu Linux users, Windows users would need to install and work in the [Git BASH](https://gitforwindows.org/) terminal.
## COMPLETE TUTORIAL

# Installing Miniconda3

## Download and install Miniconda
### Download it

Please go to the [Anaconda website](https://conda.io/miniconda.html).
Download and install *the latest* Miniconda version for *Python* 3.7 for your operating system.
To Install simply type this command in terminal:

```bash
wget <http:// link to miniconda>
sh <miniconda*.sh>
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
```


or you can download the suitable version through website:

## Check-out the git repository with the exercise

Once Miniconda is ready, checkout the course repository and proceed with setting up the environment:
```bash
https://docs.conda.io/en/latest/miniconda.html
```


### Install

Using Terminal navigate to the directory and Install the miniconda3 bash Miniconda3-latest-Linux-x86_64.sh (Verify the name of .sh file)

You do not want to automatically activate the conda environment, so apply this command:

```bash
conda config --set auto_activate_base false
```



### Source it

```bash
source ~/.bashrc
```


# Download Course from github

Download with git clone and Open New Terminal and apply the following command:

```bash
git clone https://github.com/Atcold/pytorch-Deep-Learning

cd pytorch-Deep-Learning
```



# Install Pytorch using conda

Pytorch is installed inside Conda Environment


### Give path to the conda


```bash
export PATH="parent_path/miniconda3/bin:$PATH"

```

If you dont give this command you may encounter Error “ conda: command not found”

### Create Conda Environment

```bash
conda env create -f environment.yml

```


### Check available environment

```bash
conda env list
```


### Activate the environment

```bash
git clone https://github.com/Atcold/pytorch-Deep-Learning
conda activate
```


You will notice that in terminal user@machine will become (environment)
user@machine

## Create isolated Miniconda environment
### Install Pytorch in this environment

Change directory (`cd`) into the course folder, then type:
conda install pytorch torchvision cpuonly -c pytorch

# Install Jupyter Notebook using conda

```bash
# cd pytorch-Deep-Learning
conda env create -f environment.yml
source activate pDL
conda install jupyter
```


### Check what features are installed in coda

```bash
conda list
```

you will find the jupyter, pytorch, ipython etc in the list shown

## Start Jupyter Notebook or JupyterLab
### Run Jupyter Notebook

Start from terminal as usual:
With in the same terminal where environment is activated run the following command:

```bash
jupyter lab
jupyter notebook

```

Or, for the classic interface:
### Close Jupyter Notebook

```bash
jupyter notebook
Ctrl+C
```


### Deactivate Conda Environment


```bash
conda deactivate
```





## Notebooks visualisation

*Jupyter Notebooks* are used throughout these lectures for interactive data exploration and visualisation.

We use dark styles for both *GitHub* and *Jupyter Notebook*.
You should try to do the same, or they will look ugly.
JupyterLab has a built-in selectable dark theme, so you only need to install something if you want to use the classic notebook interface.
To see the content appropriately in the classic interface install the following:

- [*Jupyter Notebook* dark theme](https://userstyles.org/styles/153443/jupyter-notebook-dark);
- [*GitHub* dark theme](https://userstyles.org/styles/37035/github-dark) and comment out the `invert #fff to #181818` code block.