|
|
|
|
|
|
|
## Use Docker for Fidle
|
|
|
|
# Use Docker for Fidle
|
|
|
|
|
|
|
|
### Pre-requesites:
|
|
|
|
**- Pre-requesites -**
|
|
|
|
|
|
|
|
- [Docker](https://docs.docker.com) should be installed on your computer !
|
|
|
|
- Check the [download Docker page info](https://docs.docker.com/get-docker/)
|
|
|
|
- Do not forget [the post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/) (for Linux in particular)
|
|
|
|
|
|
|
|
### Remark
|
|
|
|
**- Remark -**
|
|
|
|
|
|
|
|
- All commands presented below and prefixed by `$` are to be launched on a terminal/unix console :smile:
|
|
|
|
|
|
|
|
### 1 - Get the Fidle Docker image
|
|
|
|
|
|
|
|
- Get Fidle image : ...it takes some time... (\~5mn) and the image is quiet huge (\~6.5 GB) \
|
|
|
|
`$ docker pull gricad-registry.univ-grenoble-alpes.fr/talks/fidle/fidle_cpu:python3.7`
|
|
|
|
|
|
|
|
### 2 - Check the image has been pulled :
|
|
|
|
|
|
|
|
- Have a look to your image:\
|
|
|
|
`$ docker images`\
|
|
|
|
On standard output, you should have a line of the form
|
|
|
|
## 1 - Get the Fidle Docker image
|
|
|
|
|
|
|
|
- Get Fidle image : ...it takes some time... (\~5mn) and the image is quiet huge (\~6.5 GB)
|
|
|
|
```
|
|
|
|
gricad-registry.univ-grenoble-alpes.fr/talks/fidle/fidle_cpu python3.7 [...] 6.05GB
|
|
|
|
$ docker pull gricad-registry.univ-grenoble-alpes.fr/talks/fidle/fidle_cpu:python3.7
|
|
|
|
```
|
|
|
|
|
|
|
|
- You can [check your image](Check-Docker-image)
|
|
|
|
|
|
|
|
- You can test it :\
|
|
|
|
`$ docker run --rm gricad-registry.univ-grenoble-alpes.fr/talks/fidle/fidle_cpu:python3.7 fid check`\
|
|
|
|
You should see printed the following lines (version numbers may change) :
|
|
|
|
|
|
|
|
- To see if your image is there:
|
|
|
|
```
|
|
|
|
==========================================================
|
|
|
|
fid - Your favorite Fidle admin command :-) (v2.0b47)
|
|
|
|
==========================================================
|
|
|
|
|
|
|
|
Notebooks and datasets can only be found if they are in/near the explored folder.
|
|
|
|
Explored directory is : /notebooks
|
|
|
|
|
|
|
|
Datasets dir found :
|
|
|
|
|
|
|
|
//data/datasets-fidle (Datasets Fidle / 1.6)
|
|
|
|
The environment variable FIDLE_DATASETS_DIR is : /data/datasets-fidle
|
|
|
|
|
|
|
|
Notebooks dir found :
|
|
|
|
$ docker images
|
|
|
|
```
|
|
|
|
On standard output, you should have a line of the form <br>
|
|
|
|
*gricad-registry.univ-grenoble-alpes.fr/talks/fidle/fidle_cpu python3.7 [...] 6.05GB*
|
|
|
|
|
|
|
|
//notebooks/fidle-master (Notebooks Fidle / 2.2.2)
|
|
|
|
/notebooks/fidle-master (Notebooks Fidle / 2.2.2)
|
|
|
|
- You can also [check your image](Check-Docker-image)
|
|
|
|
|
|
|
|
Check environment :
|
|
|
|
|
|
|
|
Python : Ok (3.7.15)
|
|
|
|
Fidle module : Ok (2.0b47)
|
|
|
|
tensorflow : Ok (2.9.0)
|
|
|
|
tensorflow.keras : Ok (2.9.0)
|
|
|
|
numpy : Ok (1.21.6)
|
|
|
|
sklearn : Ok (1.0.2)
|
|
|
|
skimage : Ok (0.19.3)
|
|
|
|
matplotlib : Ok (3.5.3)
|
|
|
|
plotly : Ok (5.10.0)
|
|
|
|
pandas : Ok (1.3.5)
|
|
|
|
jupyterlab : Ok (3.4.8)
|
|
|
|
torch : Ok (1.12.1+cu102)
|
|
|
|
torchvision : Ok (0.13.1+cu102)
|
|
|
|
```
|
|
|
|
|
|
|
|
### 3 - Create an instance (a "container")
|
|
|
|
## 3 - Create an instance (a "container")
|
|
|
|
|
|
|
|
- This instance is built from the loaded image and is called a **container**<br>
|
|
|
|
`$ docker create -p 8888:8888 --name Fidle gricad-registry.univ-grenoble-alpes.fr/talks/fidle/fidle_cpu:python3.7 jupyter lab`<br>
|
|
|
|
where --name Fidle is used to give a name to our container
|
|
|
|
```
|
|
|
|
$ docker create -p 8888:8888 --name Fidle \
|
|
|
|
gricad-registry.univ-grenoble-alpes.fr/talks/fidle/fidle_cpu:python3.7 \
|
|
|
|
jupyter lab
|
|
|
|
```
|
|
|
|
where `--name Fidle` is used to give a name to your container
|
|
|
|
|
|
|
|
### 4 - Run our instance
|
|
|
|
- Just type : <br>
|
|
|
|
`$ docker start -i Fidle`
|
|
|
|
## 4 - Start/Stop your container/instance
|
|
|
|
**To start, Just type :**
|
|
|
|
```
|
|
|
|
$ docker start -i Fidle
|
|
|
|
```
|
|
|
|
- Copy the URL printed on screen beginning with `http://127.0.0.1:8888/?token`...
|
|
|
|
- Open a Web Browser and paste the URL
|
|
|
|
- Jupyterlab for Fidle should be there !
|
|
|
|
|
|
|
|
### Stop Fidle Jupyterlab
|
|
|
|
**To Stop, you can :**
|
|
|
|
|
|
|
|
Choice of :
|
|
|
|
- In Jupyter lab menu : "File"/"Shutdown"
|
|
|
|
- On the Unix console/Terminal you launched Fidle Jupyterlab: <br>
|
|
|
|
use Control-C to stop this server and shutdown all kernels
|
|
|
|
|
|
|
|
**To restart your Fidle container :** just go to step 4) ! |