diff --git a/docker/fidle_python_pip.dockerfile b/docker/fidle_python_pip.dockerfile index 07bd9dd3f7716cb67d88814ebff9dc87a9172f36..f4ef2430daa20c57af7b90c39e43d9a2dc63cf2e 100644 --- a/docker/fidle_python_pip.dockerfile +++ b/docker/fidle_python_pip.dockerfile @@ -1,10 +1,9 @@ # # -ARG PYTHON_VERSION=3.7 +ARG PYTHON_VERSION=3.8 ARG docker_image_base=python:${PYTHON_VERSION}-slim FROM ${docker_image_base} -MAINTAINER soraya.arias@inria.fr LABEL maintainer=soraya.arias@inria.fr # Ensure a sane environment @@ -12,7 +11,6 @@ ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 DEBIAN_FRONTEND=noninteractive RUN apt update --fix-missing && \ apt install -y --no-install-recommends apt-utils && \ - apt install wget curl git \ python3-venv python3-pip && \ apt -y dist-upgrade && \ curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \ @@ -21,25 +19,24 @@ RUN apt update --fix-missing && \ rm -fr /var/lib/apt/lists/* # Get Python requirement packages list -COPY requirements.txt /root/requirements.txt +COPY requirements-cpu.txt /root/requirements.txt # Add & Update Python tools and install requirements packages -RUN pip install --upgrade pip && \ - pip install -I --upgrade setuptools && \ - pip install -r /root/requirements.txt +RUN python -m pip install --upgrade pip && \ + pip install --no-cache-dir -I --upgrade setuptools && \ + pip install --no-cache-dir -r /root/requirements.txt # Get Fidle datasets +# - datasets RUN mkdir /data && \ - wget -c https://fidle.cnrs.fr/fidle-datasets.tar && tar -xf fidle-datasets.tar -C /data/ && \ - rm fidle-datasets.tar - -# Notebooks as a volume -RUN mkdir /notebooks/; cd /notebooks && \ - git clone https://gricad-gitlab.univ-grenoble-alpes.fr/talks/fidle.git + fid install_datasets --quiet --install_dir /data +# - notebooks +RUN mkdir /notebooks/ && \ + fid install_notebooks --quiet --install_dir /notebooks # Add Jupyter configuration (no browser, listen all interfaces, ...) COPY jupyter_lab_config.py /root/.jupyter/jupyter_lab_config.py -COPY fidle_env_test.py /root/fidle_env_test.py +COPY notebook.json /root/.jupyter/nbconfig/notebook.json # Jupyter notebook uses 8888 EXPOSE 8888 @@ -48,13 +45,13 @@ VOLUME /notebooks WORKDIR /notebooks # Set a folder in the volume as Python Path -ENV PYTHONPATH=/notebooks/fidle/:$PYTHONPATH +ENV PYTHONPATH=/notebooks/fidle-master/:$PYTHONPATH # Force bash as the default shell (useful in the notebooks) ENV SHELL=/bin/bash # Set Fidle dataset directory variable -ENV FIDLE_DATASETS_DIR=/data/fidle-datasets +ENV FIDLE_DATASETS_DIR=/data/datasets-fidle # Run a notebook by default CMD ["jupyter", "lab"] diff --git a/docker/jupyter_lab_config.py b/docker/jupyter_lab_config.py index 81d0a2bb825a1bf4bd2eaabdeaa9996ce9b5c2f0..dcc8405eaba2caf1a761a27daba88ce042988a32 100644 --- a/docker/jupyter_lab_config.py +++ b/docker/jupyter_lab_config.py @@ -900,7 +900,7 @@ c.ServerApp.quit_button = True ## The directory to use for notebooks and kernels. # Default: '' -c.ServerApp.root_dir = '/notebooks/fidle' +c.ServerApp.root_dir = '/notebooks/fidle-master' ## The session manager class to use. # Default: 'jupyter_server.services.sessions.sessionmanager.SessionManager' diff --git a/docker/requirements-cpu.txt b/docker/requirements-cpu.txt new file mode 100644 index 0000000000000000000000000000000000000000..c121ed09d88881b0afd5a9dfc3a6a62099d35ab4 --- /dev/null +++ b/docker/requirements-cpu.txt @@ -0,0 +1,23 @@ +# ---------------------------------------------------- +# ______ _ _ _ __ __ +# | ____(_) | | | \ \ / / +# | |__ _ __| | | ___ \ \ / /__ _ ____ __ +# | __| | |/ _` | |/ _ \ \ \/ / _ \ '_ \ \ / / +# | | | | (_| | | __/ \ / __/ | | \ V / +# |_| |_|\__,_|_|\___| \/ \___|_| |_|\_/ +# Fidle pip virtual env +# ---------------------------------------------------- +# +# To install your Fidle env, see https://fidle.cnrs.fr/installation + +tensorflow_cpu>=2.7,<=2.9 +scikit-image +scikit-learn +matplotlib +plotly +barviz +fidle +jupyterlab +-f https://download.pytorch.org/whl/cpu +torch +torchvision diff --git a/docker/requirements.txt b/docker/requirements.txt deleted file mode 100644 index 0118e42cdd8a5c205bc0af1b0501861e47cc6b43..0000000000000000000000000000000000000000 --- a/docker/requirements.txt +++ /dev/null @@ -1,11 +0,0 @@ -tensorflow_cpu -Scikit-image -Scikit-learn -Matplotlib -Pandas -Pandoc -pyyaml -torch -torchvision -torchaudio -Jupyterlab