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
025caea4
Commit
025caea4
authored
3 years ago
by
EXT Soraya Arias
Browse files
Options
Downloads
Patches
Plain Diff
Modif to include fidle datasets + test scripts + jupytrerlab config settings
parent
80b39224
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docker/fidle_env_test.py
+20
-0
20 additions, 0 deletions
docker/fidle_env_test.py
docker/fidle_python_pip.dockerfile
+24
-10
24 additions, 10 deletions
docker/fidle_python_pip.dockerfile
docker/jupyter_notebook_config.py
+6
-6
6 additions, 6 deletions
docker/jupyter_notebook_config.py
with
50 additions
and
16 deletions
docker/fidle_env_test.py
0 → 100644
+
20
−
0
View file @
025caea4
#!/usr/bin/env python3
## Some tests to check fidle installation is ok
##
import
tensorflow
as
tf
import
sys
,
os
# Check data set is found
datasets_dir
=
os
.
getenv
(
'
FIDLE_DATASETS_DIR
'
,
False
)
if
datasets_dir
is
False
:
print
(
"
FIDLE_DATASETS_DIR not found - Should be /data/fidle_datasets/
"
)
sys
.
exit
(
1
)
print
(
"
FIDLE_DATASETS_DIR =
"
,
os
.
path
.
expanduser
(
datasets_dir
))
# Check Python version
print
(
"
Python version = {}.{}
"
.
format
(
sys
.
version_info
[
0
],
sys
.
version_info
[
1
]))
# Check tensorflow version
print
(
"
Tensorflow version =
"
,
tf
.
__version__
)
sys
.
exit
(
0
)
This diff is collapsed.
Click to expand it.
docker/fidle_python_pip.dockerfile
+
24
−
10
View file @
025caea4
FROM
python:3.7-slim
#
#
ARG
PYTHON_VERSION=3.7
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
...
...
@@ -11,6 +17,7 @@ RUN apt update --fix-missing && \
apt clean
&&
\
rm
-fr
/var/lib/apt/lists/
*
# Get Python requirement packages list
COPY
requirements.txt /root/requirements.txt
# Add & Update Python tools and install requirements packages
...
...
@@ -18,27 +25,34 @@ RUN pip install --upgrade pip && \
pip
install
-I
--upgrade
setuptools
&&
\
pip
install
-r
/root/requirements.txt
# Get Fidle 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
# Add Jupyter configuration (no browser, listen all interfaces, ...)
COPY
jupyter_notebook_config.py /root/.jupyter/jupyter_notebook_config.py
#
COPY jupyter_notebook_config.py /root/.jupyter/jupyter_notebook_config.py
COPY
notebook.json /root/.jupyter/nbconfig/notebook.json
COPY
fidle_env_test.py /root/fidle_env_test.py
# Notebooks as a volume
RUN
mkdir
/notebooks/
;
cd
/notebooks
&&
\
git clone https://gricad-gitlab.univ-grenoble-alpes.fr/talks/fidle.git
# Jupyter notebook uses 8888
EXPOSE
8888
VOLUME
/notebooks
WORKDIR
/notebooks
#COPY data/fidle-datasets /data
# Set a folder in the volume as Python Path
ENV
PYTHONPATH=/notebooks/
python_path
:$PYTHONPATH
ENV
PYTHONPATH=/notebooks/
fidle/
:$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
ENV
FIDLE_DATASETS_DIR=/data
/fidle-datasets
# Run a notebook by default
CMD
["jupyter", "notebook", "--port=8888", "--ip=
0.0.0.0
"]
CMD
["jupyter", "notebook", "--port=8888", "--ip=
*", "--allow-root", "--notebook-dir=/notebooks/fidle", "--no-browser
"]
This diff is collapsed.
Click to expand it.
docker/jupyter_notebook_config.py
+
6
−
6
View file @
025caea4
...
...
@@ -15,23 +15,23 @@ c.Application.log_level = 'INFO'
c
.
NotebookApp
.
ip
=
'
*
'
# Password to access the server
c
.
Notebook
App
.
password
=
''
c
.
Notebook
App
.
allow_password_change
=
False
c
.
Notebook
.
password
=
''
c
.
Notebook
.
allow_password_change
=
False
## The directory to use for notebooks and kernels.
c
.
NotebookApp
.
notebook_dir
=
'
/notebooks
'
c
.
NotebookApp
.
notebook_dir
=
'
/notebooks
/fidle
'
## Whether to open in a browser after starting. The specific browser used is
# platform dependent and determined by the python standard library `webbrowser`
# module, unless it is overridden using the --browser (NotebookApp.browser)
# configuration option.
c
.
NotebookApp
.
open_browser
=
Fals
e
c
.
NotebookApp
.
open_browser
=
Tru
e
## The port the notebook server will listen on.
c
.
Notebook
App
.
port
=
8888
c
.
Notebook
.
port
=
8888
## Allow running as root
c
.
Notebook
App
.
allow_root
=
True
c
.
Notebook
.
allow_root
=
True
## Disable the "Quit" button on the Web UI (shuts down the server)
c
.
NotebookApp
.
quit_button
=
False
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