diff --git a/docker/Dockerfile b/docker/Dockerfile index 2737f21f6a293a31940976bb6a516e30bb855a19..86588d775d46423a4f5227f93ca529a2dfd2394c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -7,12 +7,14 @@ FROM ${docker_image_base} LABEL maintainer1=soraya.arias@inria.fr maintainer2=jean-luc.parouty@simap.grenoble-inp.fr ARG ARCH_VERSION=cpu +ARG FIDLE_VERSION=3.0.3 # Ensure a sane environment ENV TZ=Europe/Paris LANG=C.UTF-8 LC_ALL=C.UTF-8 DEBIAN_FRONTEND=noninteractive 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 \ + procps \ python3-venv \ python3-pip && \ apt -y dist-upgrade && \ @@ -22,14 +24,10 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone & # copy Python requirement packages list in docker image COPY requirements_packages_${ARCH_VERSION}.txt /root/requirements_packages_${ARCH_VERSION}.txt -# Update Python tools and install requirements packages +# Update Python tools and install requirements packages for Fidle RUN python3 -m pip install --upgrade pip && \ pip3 install --no-cache-dir --upgrade -r /root/requirements_packages_${ARCH_VERSION}.txt -# Special case to deal with keras_cv and keras3 ! -RUN pip3 install --no-cache-dir --upgrade keras-cv tensorflow && \ - pip3 install --no-cache-dir --upgrade keras - # Install tensorboard & update jupyter RUN pip3 install --no-cache-dir --upgrade tensorboard tensorboardX jupyter ipywidgets @@ -47,7 +45,7 @@ RUN mkdir /data && \ # Get Fidle notebooks and create link RUN mkdir /notebooks/ && \ fid install_notebooks --notebooks fidle-pre-master --quiet --install_dir /notebooks && \ - ln -s /notebooks/fidle-pre-master-3.0.0 /notebooks/fidle-master + ln -s /notebooks/fidle-pre-master-${FIDLE_VERSION} /notebooks/fidle-master # Add Jupyter configuration (no browser, listen all interfaces, ...) COPY jupyter_lab_config.py /root/.jupyter/jupyter_lab_config.py @@ -62,11 +60,12 @@ EXPOSE 6006 VOLUME /notebooks WORKDIR /notebooks -# Set a folder in the volume as Python Path +# Set Keras backend ENV KERAS_BACKEND torch +# Set Python path to add fidle path ENV PYTHONPATH=/notebooks/fidle-master/:$PYTHONPATH -# Force bash as the default shell (useful in the notebooks) +# Set default shell (useful in the notebooks) ENV SHELL=/bin/bash # Set Fidle dataset directory variable diff --git a/docker/jupyter_lab_config.py b/docker/jupyter_lab_config.py index 688c382b87a379c8c7670d9c71c246d60307973f..dae4a649792336c964deab51227e7f554b9c0f72 100644 --- a/docker/jupyter_lab_config.py +++ b/docker/jupyter_lab_config.py @@ -371,7 +371,7 @@ c.Application.log_level = 'INFO' ## The default URL to redirect to from `/` # Default: '/lab' -# c.LabApp.default_url = '/lab' +c.LabApp.default_url = '/lab/tree/README.ipynb' ## Whether to start the app in dev mode. Uses the unpublished local # JavaScript packages in the `dev_mode` folder. In this case JupyterLab will @@ -679,7 +679,7 @@ c.ServerApp.allow_root = True ## The default URL to redirect to from `/` # Default: '/' -# c.ServerApp.default_url = '/' +c.ServerApp.default_url = '/lab/tree/README.ipynb' ## Disable cross-site-request-forgery protection # diff --git a/docker/requirements_packages_cpu.txt b/docker/requirements_packages_cpu.txt index 9c8e0ec2d84ba64579585feb738f8c6e756a2ed4..e5da40f9c504609e78a0ef92c542634bcc21ee30 100644 --- a/docker/requirements_packages_cpu.txt +++ b/docker/requirements_packages_cpu.txt @@ -11,17 +11,15 @@ # To install your Fidle env, see https://fidle.cnrs.fr/installation # # Keras 3 / PyTorch version (Python 3.9.2) -# keras -# keras_cv - --extra-index-url https://download.pytorch.org/whl/cpu - keras torch torchvision - torchaudio + torch-geometric + torchtext + torchdata lightning - tensorboard + keras numpy Scikit-image Scikit-learn