Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Fidle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Talks
Fidle
Commits
783ef768
Commit
783ef768
authored
1 year ago
by
EXT Soraya Arias
Browse files
Options
Downloads
Patches
Plain Diff
Modification to handle Keras3
parent
314e6afb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docker/Dockerfile
+19
-13
19 additions, 13 deletions
docker/Dockerfile
docker/jupyter_lab_config.py
+3
-3
3 additions, 3 deletions
docker/jupyter_lab_config.py
docker/requirements_packages_cpu.txt
+8
-3
8 additions, 3 deletions
docker/requirements_packages_cpu.txt
with
30 additions
and
19 deletions
docker/Dockerfile
+
19
−
13
View file @
783ef768
# 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
pip
3
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
#
i
nstall tensorboard & update j
y
pyter
RUN
pip
install
--no-cache-dir
--upgrade
tensorboard tensorboardX jupyter ipywidgets
#
I
nstall tensorboard & update j
u
pyter
RUN
pip
3
install
--no-cache-dir
--upgrade
tensorboard tensorboardX jupyter ipywidgets
#
m
ove default logo python
#
M
ove 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
This diff is collapsed.
Click to expand it.
docker/jupyter_lab_config.py
+
3
−
3
View file @
783ef768
...
...
@@ -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'
...
...
This diff is collapsed.
Click to expand it.
docker/requirements_packages.txt
→
docker/requirements_packages
_cpu
.txt
+
8
−
3
View file @
783ef768
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment