|
|
|

|
|
|
|
|
|
|
|
**NOTE : Cette procédure sera prochainement mise à jour pour la session 2 de Fidle !**\
|
|
|
|
**NOTE : This procedure will be updated soon for Fidle session 2 !**
|
|
|
|
|
|
|
|
**Important :**
|
|
|
|
- The procedure below is **validated under Linux**, remember that Debian is good for you !
|
|
|
|
- Under MacOS, the installation is a priori possible [manually](https://gricad-gitlab.univ-grenoble-alpes.fr/talks/fidle/-/wikis/Using-Fidle/Install-Fidle#manual-installation), but sorry, we won't be able to help you much...
|
|
|
|
- Under Windows, some instructions are given, the use on <b>miniconda 3.8 for Windows</b> is helpful, as well as the use of Anaconda Prompt terminal. But only the [manual installation of fidle environement](https://gricad-gitlab.univ-grenoble-alpes.fr/talks/fidle/-/wikis/Using-Fidle/Install-Fidle#manual-installation) has been validated.
|
|
|
|
<!--
|
|
|
|
The use of [WSL](https://docs.microsoft.com/fr-fr/windows/wsl/faq) is the best strategy ;-)
|
|
|
|
-->
|
|
|
|
|
|
|
|
**Ressources :**
|
|
|
|
- All notebooks can run on CPU or GPU
|
|
|
|
- The software environment (conda) requires about 10G
|
|
|
|
- Original datasets require about 2.5G
|
|
|
|
- Consolidated datasets may require up to 150G depending on the tests you perform... but 15GB will probably be a minimum...
|
|
|
|
|
|
|
|
The **installation** consists of **3 steps**:
|
|
|
|
|
|
|
|
1/ [Get **Fidle repository**](#1-get-fidle-repository)\
|
|
|
|
2/ [Get **datasets**](#2-get-datasets)\
|
|
|
|
3/ [Setup **Fidle environment**](#3-setup-fidle-environment)\
|
|
|
|
4/ [Start Jupyter lab](#4-start-jupyter-lab-)
|
|
|
|
|
|
|
|
<!--
|
|
|
|
<em>
|
|
|
|
Once the Fidle requirements as been installed, to run Fidle, from your Fidle repository :</em>
|
|
|
|
```bash
|
|
|
|
conda activate fidle
|
|
|
|
cd <PATH_TO_CLONED_FIDLE_REPO>
|
|
|
|
jupyter lab
|
|
|
|
```
|
|
|
|
-->
|
|
|
|
|
|
|
|
## 1/ Get Fidle repository
|
|
|
|
|
|
|
|
The simplest and most conventional way is with **git** (100 MB):
|
|
|
|
```bash
|
|
|
|
git clone https://gricad-gitlab.univ-grenoble-alpes.fr/talks/fidle.git
|
|
|
|
```
|
|
|
|
However, a **classic retrieval** (zip, tar, ?...) is possible via the download button, near [Clone] button.
|
|
|
|
|
|
|
|
**Important :** The project is frequently updated and we encourage you to get the latest version. The version number is specified in the README of the repository.
|
|
|
|
|
|
|
|
## 2/ Get Datasets
|
|
|
|
|
|
|
|
**Get it**
|
|
|
|
The datasets used in the examples are [available here](https://cloud.univ-grenoble-alpes.fr/index.php/s/wxCztjYBbQ6zwd6).
|
|
|
|
You can retrieve and decompress them using the following commands:
|
|
|
|
```bash
|
|
|
|
wget https://cloud.univ-grenoble-alpes.fr/index.php/s/XAHB7PRmTabTTz7/download -O datasets.tar
|
|
|
|
tar -xf datasets.tar
|
|
|
|
```
|
|
|
|
|
|
|
|
**Specify the location**
|
|
|
|
You must then indicate the location of this folder with an environment variable.
|
|
|
|
|
|
|
|
- For computers under Linux, add the following line to your `.bashrc`, or `.bash_profile, ...
|
|
|
|
```bash
|
|
|
|
export FIDLE_DATASETS_DIR=<the place of your datasets directory>
|
|
|
|
```
|
|
|
|
- For computers under Windows (and using a terminal that is NOT a powershell!)
|
|
|
|
```bash
|
|
|
|
set FIDLE_DATASETS_DIR=<the place of your datasets directory>
|
|
|
|
```
|
|
|
|
|
|
|
|
A complete description of the different datasets is available in Notebooks.
|
|
|
|
|
|
|
|
|
|
|
|
## 3/ Setup Fidle Environment
|
|
|
|
|
|
|
|
### Easy way (but may generate conflit errors...)
|
|
|
|
Fidle Jupyter notebooks need a special but classic deep learning Python environment.
|
|
|
|
|
|
|
|
We prepare a conda environment (for Linux OS and for Windows OS) that can easily be installed when using conda.
|
|
|
|
The conda environment file is located at ```<PATH_TO_CLONED_FIDLE_REPO>/fidle_environment_[linux|windows10].txt```.
|
|
|
|
|
|
|
|
This environment can be created using **conda tool** with the following 1-line command (need 6 GB min.):
|
|
|
|
<!---
|
|
|
|
```bash
|
|
|
|
conda env create -f environment.yml
|
|
|
|
```
|
|
|
|
--->
|
|
|
|
#### For Linux
|
|
|
|
- If no NVIDIA card is available on your computer or [NVIDIA card is not compliant with driver cuda 10.x](https://docs.nvidia.com/deploy/cuda-compatibility/index.html)
|
|
|
|
```bash
|
|
|
|
conda create --name fidle --file <PATH_TO_CLONED_FIDLE_REPO>/fidle_environment_linux.txt
|
|
|
|
```
|
|
|
|
- If [your NVIDIA card is compliant with driver cuda 10.x](https://docs.nvidia.com/deploy/cuda-compatibility/index.html)
|
|
|
|
```bash
|
|
|
|
conda create --name fidle --file <PATH_TO_CLONED_FIDLE_REPO>/fidle_environment_linux_gpu_cuda101.txt
|
|
|
|
```
|
|
|
|
#### For Windows
|
|
|
|
**=> with miniconda 3.8 installed and using a Anaconda prompt terminal**
|
|
|
|
|
|
|
|
- If no NVIDIA card available or [NVIDIA card is not compliant with driver cuda 10.x](https://docs.nvidia.com/deploy/cuda-compatibility/index.html)
|
|
|
|
```bash
|
|
|
|
conda create --name fidle --file <PATH_TO_CLONED_FIDLE_REPO>\fidle_environment_windows10.txt
|
|
|
|
```
|
|
|
|
- If [your NVIDIA card is compliant with driver cuda 10.x](https://docs.nvidia.com/deploy/cuda-compatibility/index.html)
|
|
|
|
```bash
|
|
|
|
conda create --name fidle --file <PATH_TO_CLONED_FIDLE_REPO>\fidle_environment_windows10_gpu_cuda101.txt
|
|
|
|
```
|
|
|
|
|
|
|
|
If you get some conflitcts erros, you can try [the manual installation below](https://gricad-gitlab.univ-grenoble-alpes.fr/talks/fidle/-/wikis/Using-Fidle/Install-Fidle#manual-installation).
|
|
|
|
|
|
|
|
### Conda not found...
|
|
|
|
If the **conda** command is **not found**, the easiest way is to install **Anaconda** or **Miniconda**.
|
|
|
|
- About [anaconda installation](https://docs.anaconda.com/anaconda/install/)
|
|
|
|
- About [miniconda installation](https://docs.conda.io/en/latest/miniconda.html) (smaller, best choice !!)\
|
|
|
|
**January 2021** : Using [Python 3.8 / Miniconda3 Linux 64-bit](https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh) should be a good choice :-)
|
|
|
|
|
|
|
|
#### About conda environment
|
|
|
|
- See [there](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)
|
|
|
|
- Some infrastructures, such as **IDRIS** or **GRICAD**, offer ready-made environments. Read the docs ;-)
|
|
|
|
|
|
|
|
### Manual installation
|
|
|
|
This solution can be adapted if the procedure described above does not work.\
|
|
|
|
This can be the case, for example under MacOS.\
|
|
|
|
List of required packages must include :
|
|
|
|
* [Python](https://www.python.org) = 3.8
|
|
|
|
* [Numpy](https://numpy.org) = 1.19
|
|
|
|
* [Tensorflow](https://www.tensorflow.org) >=2.2
|
|
|
|
* [Scikit-image](https://scikit-image.org)
|
|
|
|
* [Scikit-learn](https://scikit-learn.org)
|
|
|
|
* [Matplotlib](https://matplotlib.org)
|
|
|
|
* [Pandas](https://pandas.pydata.org/)
|
|
|
|
* [Jupyter lab](https://jupyter.org/)
|
|
|
|
* [Pytorch](https://pytorch.org/)
|
|
|
|
* [Torchvision](https://pytorch.org/docs/stable/torchvision/index.html)
|
|
|
|
|
|
|
|
With conda you can use :
|
|
|
|
#### For Linux
|
|
|
|
- If no NVIDIA card is available on your computer or [NVIDIA card is not compliant with driver cuda 10.x](https://docs.nvidia.com/deploy/cuda-compatibility/index.html)
|
|
|
|
```bash
|
|
|
|
conda create --name fidle
|
|
|
|
conda activate fidle
|
|
|
|
conda install python=3.8 numpy=1.19 scikit-learn scikit-image matplotlib pandas jupyterlab
|
|
|
|
conda install tensorflow=2.2
|
|
|
|
conda install -c pytorch pytorch-cpu torchvision
|
|
|
|
```
|
|
|
|
- If [your NVIDIA card is compliant with driver cuda 10.x](https://docs.nvidia.com/deploy/cuda-compatibility/index.html)
|
|
|
|
```bash
|
|
|
|
conda create --name fidle
|
|
|
|
conda activate fidle
|
|
|
|
conda install python=3.8 numpy=1.19 scikit-learn scikit-image matplotlib pandas jupyterlab
|
|
|
|
conda install tensorflow-gpu=2.2
|
|
|
|
conda install -c pytorch pytorch=1.7.1=py3.8_cuda10.1.243_cudnn7.6.3_0 torchvision
|
|
|
|
```
|
|
|
|
|
|
|
|
#### For Windows
|
|
|
|
**=> with miniconda 3.8 installed and using a Anaconda prompt terminal**
|
|
|
|
|
|
|
|
- If no NVIDIA card is available on your computer or [NVIDIA card is not compliant with driver cuda 10.x](https://docs.nvidia.com/deploy/cuda-compatibility/index.html)
|
|
|
|
```bash
|
|
|
|
conda create --name fidle
|
|
|
|
conda activate fidle
|
|
|
|
conda install python=3.8 numpy=1.19.5 scikit-learn scikit-image matplotlib pandas jupyterlab
|
|
|
|
conda install tensorflow=2.3
|
|
|
|
conda install -c pytorch pytorch torchvision
|
|
|
|
```
|
|
|
|
- If [NVIDIA card is compliant with driver cuda 10.x](https://docs.nvidia.com/deploy/cuda-compatibility/index.html)
|
|
|
|
```bash
|
|
|
|
conda create --name fidle
|
|
|
|
conda activate fidle
|
|
|
|
conda install python=3.8 numpy=1.19.5 scikit-learn scikit-image matplotlib pandas jupyterlab
|
|
|
|
conda install tensorflow-gpu=2.3 tensorflow=2.3=mkl_py38h1fcfbd6_0
|
|
|
|
conda install -c pytorch pytorch torchvision
|
|
|
|
```
|
|
|
|
|
|
|
|
This manual procedure is indicative because it can vary according to the evolution of the versions of this or that package...
|
|
|
|
|
|
|
|
### Test tensorflow installation
|
|
|
|
|
|
|
|
If you want to check your tensorflow installation (and check if it supports gpu), launch a python interpreter and use these instructions :
|
|
|
|
```python
|
|
|
|
import tensorflow as tf
|
|
|
|
print(tf.__version__)
|
|
|
|
print(tf.test.is_built_with_cuda())
|
|
|
|
print(tf.config.list_physical_devices('GPU'))
|
|
|
|
```
|
|
|
|
### Test pytorch installation
|
|
|
|
|
|
|
|
If you want to check your pytorch installation (and check if it supports gpu), launch a python interpreter and use these instructions :
|
|
|
|
```python
|
|
|
|
import torch
|
|
|
|
print(torch.__version__)
|
|
|
|
print(torch.cuda.is_available())
|
|
|
|
print(torch.cuda.device_count())
|
|
|
|
```
|
|
|
|
|
|
|
|
## 4/ Start Jupyter lab :
|
|
|
|
|
|
|
|
Very simply, as follows.
|
|
|
|
|
|
|
|
Remark : for Windows, use a Anaconda Prompt terminal to type these commands.
|
|
|
|
|
|
|
|
0. Do not forget to [set the FIDLE_DATASET_DIR variable](#2-get-datasets)
|
|
|
|
|
|
|
|
1. **Activation** of the fidle environment :
|
|
|
|
```bash
|
|
|
|
conda activate fidle
|
|
|
|
```
|
|
|
|
|
|
|
|
2. **Start** Jupyter lab :
|
|
|
|
```bash
|
|
|
|
cd <PATH_TO_CLONED_FIDLE_REPO>
|
|
|
|
jupyter lab
|
|
|
|
```
|
|
|
|
|
|
|
|
 |
|
|
\ No newline at end of file |