Skip to content
Snippets Groups Projects
Commit 783ef768 authored by EXT Soraya Arias's avatar EXT Soraya Arias
Browse files

Modification to handle Keras3

parent 314e6afb
No related branches found
No related tags found
No related merge requests found
# base image
ARG PYTHON_VERSION=3.8
ARG PYTHON_VERSION=3.9
ARG docker_image_base=python:${PYTHON_VERSION}-slim
FROM ${docker_image_base}
# maintainers
LABEL maintainer1=soraya.arias@inria.fr maintainer2=achille.mbogol-touye@grenoble-inp.fr
LABEL maintainer1=soraya.arias@inria.fr maintainer2=jean-luc.parouty@simap.grenoble-inp.fr
ARG ARCH_VERSION=cpu
# 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 vim \
apt install -y --no-install-recommends apt-utils \
python3-venv \
python3-pip && \
apt -y dist-upgrade && \
......@@ -18,31 +20,34 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &
rm -fr /var/lib/apt/lists/*
# copy Python requirement packages list in docker image
COPY requirements_packages.txt /root/requirements_packages.txt
COPY requirements_packages_${ARCH_VERSION}.txt /root/requirements_packages_${ARCH_VERSION}.txt
# Update Python tools and install requirements packages
RUN python3 -m pip install --upgrade pip && \
pip install --no-cache-dir --upgrade -r /root/requirements_packages.txt
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 jypyter
RUN pip install --no-cache-dir --upgrade tensorboard tensorboardX jupyter ipywidgets
# Install tensorboard & update jupyter
RUN pip3 install --no-cache-dir --upgrade tensorboard tensorboardX jupyter ipywidgets
# move default logo python
# Move default logo python
RUN bin/rm /usr/local/share/jupyter/kernels/python3/logo*
# Change default logo and name kernels
COPY images/env-fidle.png /usr/local/share/jupyter/kernels/python3/logo-64x64.png
COPY images/env-fidle.svg /usr/local/share/jupyter/kernels/python3/logo-svg.svg
# Get Fidle datasets
RUN mkdir /data && \
fid install_datasets --quiet --install_dir /data
# Get Fidle notebooks
# Get Fidle notebooks and create link
RUN mkdir /notebooks/ && \
fid install_notebooks --quiet --install_dir /notebooks
fid install_notebooks --notebooks fidle-pre-master --quiet --install_dir /notebooks && \
ln -s /notebooks/fidle-pre-master-3.0.0 /notebooks/fidle-master
# Add Jupyter configuration (no browser, listen all interfaces, ...)
COPY jupyter_lab_config.py /root/.jupyter/jupyter_lab_config.py
......@@ -58,7 +63,8 @@ VOLUME /notebooks
WORKDIR /notebooks
# Set a folder in the volume as Python Path
ENV PYTHONPATH=/notebooks/fidle-master-2.4.1/:$PYTHONPATH
ENV KERAS_BACKEND torch
ENV PYTHONPATH=/notebooks/fidle-master/:$PYTHONPATH
# Force bash as the default shell (useful in the notebooks)
ENV SHELL=/bin/bash
......@@ -67,4 +73,4 @@ ENV SHELL=/bin/bash
ENV FIDLE_DATASETS_DIR=/data/datasets-fidle
# Run a notebook by default
CMD ["jupyter", "lab"]
CMD ["jupyter", "lab"]
\ No newline at end of file
......@@ -903,11 +903,11 @@ c.ServerApp.quit_button = True
import os
os.environ['FIDLE_MASTER_VERSION'] = '2.4.1'
#os.environ['FIDLE_MASTER_VERSION'] = '2.4.1'
fidle_master_version = os.environ.get('FIDLE_MASTER_VERSION')
#fidle_master_version = os.environ.get('FIDLE_MASTER_VERSION')
c.ServerApp.root_dir = f'/notebooks/fidle-master-{fidle_master_version}'
c.ServerApp.root_dir = f'/notebooks/fidle-master'
## The session manager class to use.
# Default: 'jupyter_server.services.sessions.sessionmanager.SessionManager'
......
......@@ -11,20 +11,25 @@
# To install your Fidle env, see https://fidle.cnrs.fr/installation
#
# Keras 3 / PyTorch version (Python 3.9.2)
# keras
# keras_cv
keras
--extra-index-url https://download.pytorch.org/whl/cpu
torch
torchvision
torchaudio
lightning
tensorboard
numpy
Scikit-image
Scikit-learn
Matplotlib
plotly
barviz
numpy
pyarrow
Pandas
Pandoc
pyyaml
Jupyterlab
fidle
\ No newline at end of file
fidle
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment