diff --git a/README.md b/README.md index d820465b2a63cfdb07588dd610a74cccf8456198..4ae66bb7e198ce29204fe80d1ddf843a9e0c3e58 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Bash script for an OAR batch submission of an ipython code - **[GTSRB11](GTSRB/batch_slurm.sh)** - [SLURM batch script](GTSRB/batch_slurm.sh) Bash script for a Slurm batch submission of an ipython code -### Sentiment analysis with word embeddin +### Sentiment analysis with word embedding - **[IMDB1](IMDB/01-One-hot-encoding.ipynb)** - [Sentiment analysis with hot-one encoding](IMDB/01-One-hot-encoding.ipynb) A basic example of sentiment analysis with sparse encoding, using a dataset from Internet Movie Database (IMDB) - **[IMDB2](IMDB/02-Keras-embedding.ipynb)** - [Sentiment analysis with text embedding](IMDB/02-Keras-embedding.ipynb) diff --git a/docker/fidle_env_test.py b/docker/fidle_env_test.py index f3b631d1530525fb65c0551f0cfdc640818ab1df..592e6eb4ee86ec4169da55b726f9237eb99bafb8 100644 --- a/docker/fidle_env_test.py +++ b/docker/fidle_env_test.py @@ -3,6 +3,7 @@ ## import tensorflow as tf +import torch import sys, os # Check data set is found @@ -16,5 +17,12 @@ print("FIDLE_DATASETS_DIR = ", os.path.expanduser(datasets_dir)) print("Python version = {}.{}".format(sys.version_info[0], sys.version_info[1])) # Check tensorflow version print("Tensorflow version = ", tf.__version__) +# Obsolete command +#print("Tensorflow GPU/CUDA available = ", tf.test.is_gpu_available()) +print("Tensorflow GPU/CUDA available = ", "true" if len(tf.config.list_physical_devices('GPU')) else "False") + +# Chech Pytorch version +print("Pytorch version = ", torch.__version__) +print("Pytorch GPU/CUDA available = ", torch.cuda.is_available()) sys.exit(0) diff --git a/docker/fidle_python_pip.dockerfile b/docker/fidle_python_pip.dockerfile index c84f6759034a7de520eb3af275563487208731fe..a88ebe429dfed0958a5e37467b2a7b296ebb67f3 100644 --- a/docker/fidle_python_pip.dockerfile +++ b/docker/fidle_python_pip.dockerfile @@ -1,18 +1,22 @@ # # -ARG PYTHON_VERSION=3.8 +ARG PYTHON_VERSION=3.7 ARG docker_image_base=python:${PYTHON_VERSION}-slim FROM ${docker_image_base} LABEL maintainer=soraya.arias@inria.fr # Ensure a sane environment -ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 DEBIAN_FRONTEND=noninteractive +ENV TZ=Europe/Paris LANG=C.UTF-8 LC_ALL=C.UTF-8 DEBIAN_FRONTEND=noninteractive -RUN apt update --fix-missing && \ - apt install -y apt-utils \ +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ + apt update --fix-missing && \ + apt install -y --no-install-recommends apt-utils &&\ + apt install -y wget curl git \ python3-venv python3-pip && \ apt -y dist-upgrade && \ + curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \ + apt install -y nodejs && \ apt clean && \ rm -fr /var/lib/apt/lists/* @@ -36,12 +40,13 @@ RUN mkdir /notebooks/ && \ #git clone https://gricad-gitlab.univ-grenoble-alpes.fr/talks/fidle.git # Add Jupyter configuration (no browser, listen all interfaces, ...) -#COPY jupyter_notebook_config.py /root/.jupyter/jupyter_notebook_config.py COPY jupyter_lab_config.py /root/.jupyter/jupyter_lab_config.py COPY notebook.json /root/.jupyter/nbconfig/notebook.json # Jupyter notebook uses 8888 EXPOSE 8888 +# Tensor board uses 6006 +EXPOSE 6006 VOLUME /notebooks WORKDIR /notebooks @@ -56,5 +61,4 @@ ENV SHELL=/bin/bash ENV FIDLE_DATASETS_DIR=/data/datasets-fidle # Run a notebook by default -#CMD ["jupyter", "notebook", "--port=8888", "--ip=*", "--allow-root", "--notebook-dir=/notebooks/fidle-master", "--no-browser"] CMD ["jupyter", "lab"] diff --git a/docker/jupyter_lab_config.py b/docker/jupyter_lab_config.py index dcc8405eaba2caf1a761a27daba88ce042988a32..672a6556562cee86811ab0b98e2009b76d2d17ab 100644 --- a/docker/jupyter_lab_config.py +++ b/docker/jupyter_lab_config.py @@ -902,6 +902,7 @@ c.ServerApp.quit_button = True # Default: '' c.ServerApp.root_dir = '/notebooks/fidle-master' + ## The session manager class to use. # Default: 'jupyter_server.services.sessions.sessionmanager.SessionManager' # c.ServerApp.session_manager_class = 'jupyter_server.services.sessions.sessionmanager.SessionManager' diff --git a/docker/jupyter_notebook_config.py b/docker/jupyter_notebook_config.py deleted file mode 100644 index 9a0403c6c71f5a198e54afc5d0b7ca6b1f9a9ed1..0000000000000000000000000000000000000000 --- a/docker/jupyter_notebook_config.py +++ /dev/null @@ -1,37 +0,0 @@ -# Configuration file for jupyter-notebook. - -#------------------------------------------------------------------------------ -# Application(SingletonConfigurable) configuration -#------------------------------------------------------------------------------ - -## Set the log level by value or name. -c.Application.log_level = 'INFO' - -#------------------------------------------------------------------------------ -# NotebookApp(JupyterApp) configuration -#------------------------------------------------------------------------------ - -## The IP address the notebook server will listen on. -c.NotebookApp.ip = '*' - -# Password to access the server -c.Notebook.password = '' -c.Notebook.allow_password_change = False - -## The directory to use for notebooks and kernels. -c.NotebookApp.notebook_dir = '/notebooks/fidle' - -## Whether to open in a browser after starting. The specific browser used is -# platform dependent and determined by the python standard library `webbrowser` -# module, unless it is overridden using the --browser (NotebookApp.browser) -# configuration option. -c.NotebookApp.open_browser = True - -## The port the notebook server will listen on. -c.Notebook.port = 8888 - -## Allow running as root -c.Notebook.allow_root = True - -## Disable the "Quit" button on the Web UI (shuts down the server) -c.NotebookApp.quit_button = False diff --git a/docker/requirements.txt b/docker/requirements.txt index 39ea8510aaa5816109ba13f22e8248c28f38cf08..0118e42cdd8a5c205bc0af1b0501861e47cc6b43 100644 --- a/docker/requirements.txt +++ b/docker/requirements.txt @@ -5,4 +5,7 @@ Matplotlib Pandas Pandoc pyyaml +torch +torchvision +torchaudio Jupyterlab