Newer
Older
EXT Soraya Arias
committed
#
#
EXT Soraya Arias
committed
ARG docker_image_base=python:${PYTHON_VERSION}-slim
FROM ${docker_image_base}
EXT Soraya Arias
committed
LABEL maintainer=soraya.arias@inria.fr
# Ensure a sane environment
ENV TZ=Europe/Paris LANG=C.UTF-8 LC_ALL=C.UTF-8 DEBIAN_FRONTEND=noninteractive
EXT Soraya Arias
committed
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 wget curl git \
EXT Soraya Arias
committed
python3-venv python3-pip && \
apt -y dist-upgrade && \
apt clean && \
rm -fr /var/lib/apt/lists/*
EXT Soraya Arias
committed
# Get Python requirement packages list
COPY requirements-cpu.txt /root/requirements.txt
EXT Soraya Arias
committed
# Add & Update Python tools and install requirements packages
RUN python -m pip install --upgrade pip && \
pip install --no-cache-dir -I --upgrade setuptools && \
pip install --no-cache-dir -r /root/requirements.txt
EXT Soraya Arias
committed
EXT Soraya Arias
committed
# Get Fidle datasets
EXT Soraya Arias
committed
RUN mkdir /data && \
#wget -c https://fidle.cnrs.fr/fidle-datasets.tar && tar -xf fidle-datasets.tar -C /data/ && \
#rm fidle-datasets.tar
fid install_datasets --quiet --install_dir /data
# - notebooks
RUN mkdir /notebooks/ && \
fid install_notebooks --quiet --install_dir /notebooks
#git clone https://gricad-gitlab.univ-grenoble-alpes.fr/talks/fidle.git
EXT Soraya Arias
committed
EXT Soraya Arias
committed
# Add Jupyter configuration (no browser, listen all interfaces, ...)
COPY jupyter_lab_config.py /root/.jupyter/jupyter_lab_config.py
EXT Soraya Arias
committed
COPY notebook.json /root/.jupyter/nbconfig/notebook.json
EXT Soraya Arias
committed
# Jupyter notebook uses 8888
EXPOSE 8888
# Tensor board uses 6006
EXPOSE 6006
EXT Soraya Arias
committed
VOLUME /notebooks
WORKDIR /notebooks
# Set a folder in the volume as Python Path
EXT Soraya Arias
committed
ENV PYTHONPATH=/notebooks/fidle/:$PYTHONPATH
EXT Soraya Arias
committed
# Force bash as the default shell (useful in the notebooks)
ENV SHELL=/bin/bash
# Set Fidle dataset directory variable
ENV FIDLE_DATASETS_DIR=/data/datasets-fidle
EXT Soraya Arias
committed
# Run a notebook by default