|
|

|
|
|
|
|
|
**- Important -**
|
|
|
|
|
|
* The procedure below is **validated under Linux**, (Debian)
|
|
|
* Should works under **Windows** (W10)
|
|
|
* Under **MacOS**, try the [manual procedure](#annexe-1-manual-installation)
|
|
|
|
|
|
**- Prerequis -**
|
|
|
|
|
|
* 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... \
|
|
|
Anyway, 15GB will probably be a minimum...
|
|
|
|
|
|
The **installation** consists of **3 steps**:
|
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
## 1 - Get Fidle repository
|
|
|
|
|
|
The simplest and most conventional way is with **git** (200 MB):
|
|
|
|
|
|
```plaintext
|
|
|
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 and install Datasets
|
|
|
|
|
|
**Get it**\
|
|
|
The datasets used in the examples are [\*\*available here \*\*](https://cloud.univ-grenoble-alpes.fr/index.php/s/wxCzhttps://fidle.cnrs.fr/fidle-datasets.tartjYBbQ6zwd6)(2GB).\
|
|
|
On Linux, you can retrieve and decompress them using the following commands:
|
|
|
|
|
|
```plaintext
|
|
|
wget https://fidle.cnrs.fr/fidle-datasets.tar
|
|
|
tar -xf fidle-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, ...
|
|
|
|
|
|
```shell
|
|
|
export FIDLE_DATASETS_DIR=<the place of your datasets directory>
|
|
|
```
|
|
|
|
|
|
* For computers under Windows (and using a terminal that is NOT a powershell!)
|
|
|
|
|
|
```shell
|
|
|
set FIDLE_DATASETS_DIR=<the place of your datasets directory>
|
|
|
```
|
|
|
|
|
|
A complete description of the different datasets is available in Notebooks.
|
|
|
|
|
|
## 3 - Setup Python Environment
|
|
|
|
|
|
Fidle notebooks require a specific, but classical Python environment,\
|
|
|
which will be managed with Conda.
|
|
|
|
|
|
If the **conda** command is **not found**, the easiest way is to install [\*\*Miniconda \*\*](https://docs.conda.io/en/latest/miniconda.html)(or [Anaconda](https://docs.anaconda.com/anaconda/install/))**.**
|
|
|
|
|
|
### I just have a CPU :
|
|
|
|
|
|
From your Fidle repository :
|
|
|
|
|
|
```plaintext
|
|
|
conda env create -f ./environments/fidle-cpu.yml
|
|
|
```
|
|
|
|
|
|
### I have a nice GPU :
|
|
|
|
|
|
If you have a NVIDIA card, compliant with cuda 10.x driver.\
|
|
|
From your Fidle repository :
|
|
|
|
|
|
```plaintext
|
|
|
conda env create -f ./environments/fidle-gpu.yml
|
|
|
```
|
|
|
|
|
|
**NOTE:** If you are lucky enough to have an account at **IDRIS** or at your favorite **meso center**, \
|
|
|
pre-installed environments are already available !
|
|
|
|
|
|
## 4 - Start Jupyter lab :
|
|
|
|
|
|
Very simply, as follows.
|
|
|
|
|
|
1. Do not forget to [set the FIDLE_DATASET_DIR variable](#2-get-datasets)
|
|
|
2. **Activate** your fidle environment :\
|
|
|
Note : for Windows, use a Anaconda Prompt terminal to type these commands.
|
|
|
3. **Start** Jupyter lab
|
|
|
|
|
|
```
|
|
|
cd <PATH_TO_CLONED_FIDLE_REPO>
|
|
|
conda activate fidle-cpu
|
|
|
jupyter lab
|
|
|
```
|
|
|
|
|
|
Note: replace `fidle-cpu `by `fidle-gpu` if needed ;-)
|
|
|
|
|
|
## Annexe 1 - Manual installation
|
|
|
|
|
|
This solution can be adapted if the procedure described above does not work.\
|
|
|
This can be the case, for example under MacOS.
|
|
|
|
|
|
Required packages are :
|
|
|
|
|
|
* [Python](https://www.python.org) >= 3.8
|
|
|
* [Numpy](https://numpy.org) = 1.19
|
|
|
* [Tensorflow](https://www.tensorflow.org) >=2.4
|
|
|
* [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/)
|
|
|
|
|
|
With conda you can use :
|
|
|
|
|
|
#### I just have a CPU :
|
|
|
|
|
|
* 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)
|
|
|
|
|
|
```
|
|
|
conda create --name fidle
|
|
|
conda activate fidle
|
|
|
conda install tensorflow>=2.4 numpy=1.19 keras scikit-learn scikit-image
|
|
|
conda install matplotlib plotly pandas pandoc jupyterlab
|
|
|
```
|
|
|
|
|
|
### I have a nice GPU :
|
|
|
|
|
|
```shell
|
|
|
conda create --name fidle
|
|
|
conda activate fidle
|
|
|
conda install tensorflow-gpu>=2.4 numpy=1.19 keras scikit-learn scikit-image
|
|
|
conda install matplotlib plotly pandas pandoc jupyterlab
|
|
|
=> with miniconda 3.8 installed and using a Anaconda prompt terminal
|
|
|
```
|
|
|
|
|
|
**Note :** This manual procedure is indicative because it can vary according to the evolution of the versions of this or that package...
|
|
|
|
|
|
## Annexe 2 - Test installations
|
|
|
|
|
|
### Check Tensorflow / Keras
|
|
|
|
|
|
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'))
|
|
|
```
|
|
|
|
|
|
### Check Pytorch
|
|
|
|
|
|
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())
|
|
|
```
|
|
|
|
|
|
 |
|
|
\ No newline at end of file |