From d149df4923d5841b374ada61ff01f4dc0ec144ef Mon Sep 17 00:00:00 2001 From: mouradmourafiq Date: Tue, 13 Mar 2018 11:46:56 +0100 Subject: [PATCH 1/5] Add Polyaxon docs and polyaxonfiles --- .gitignore | 112 +++++++++++++++++++++++++++++++++++++++++++ .polyaxonignore | 13 +++++ README.md | 29 +++++++++++ polyaxonfile.yml | 11 +++++ polyaxonfile_gpu.yml | 11 +++++ 5 files changed, 176 insertions(+) create mode 100644 .gitignore create mode 100644 .polyaxonignore create mode 100644 polyaxonfile.yml create mode 100644 polyaxonfile_gpu.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..238f06bbce --- /dev/null +++ b/.gitignore @@ -0,0 +1,112 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Mr Developer +.mr.developer.cfg +.pydevproject +.project +.settings/ +.idea/ +.DS_Store + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# dotenv +.env + +# virtualenv +.venv +venv/ +ENV/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ + +# polyaxon configs +.polyaxon/ diff --git a/.polyaxonignore b/.polyaxonignore new file mode 100644 index 0000000000..1d0cb7d68c --- /dev/null +++ b/.polyaxonignore @@ -0,0 +1,13 @@ + +.git +.eggs +eggs +lib +lib64 +parts +sdist +var +*.pyc +*.swp +.DS_Store +./.polyaxon diff --git a/README.md b/README.md index 6039b0d710..d93ea528dc 100644 --- a/README.md +++ b/README.md @@ -32,3 +32,32 @@ These notebooks use Python 3.6 and Keras 2.0.8. They were generated on a p2.xlar * [8.4: Generating images with VAEs](http://nbviewer.jupyter.org/github/fchollet/deep-learning-with-python-notebooks/blob/master/8.4-generating-images-with-vaes.ipynb) * [8.5: Introduction to GANs](http://nbviewer.jupyter.org/github/fchollet/deep-learning-with-python-notebooks/blob/master/8.5-introduction-to-gans.ipynb ) + + +## Run on Polyaxon + +In order to run these Jupyter notebooks on Polyaxon: + + * Deploy [Polyaxon](https://docs.polyaxon.com/installation/deploy_polyaxon/) + * Install the [polyaxon-cli](https://docs.polyaxon.com/installation/install_polyaxon_cli/) + * To run the notebooks on GPU use `polyaxonfile_gpu.yml` instead of `polyaxonfile.yml` + + +```bash +# Clone the project +git clone https://github.com/polyaxon/deep-learning-with-python-notebooks-on-polyaxon.git + +cd deep-learning-with-python-notebooks-on-polyaxon + +# Login to polyaxon +polyaxon login --username= + +# Create Project +polyaxon project create --name='deep-learning-with-python-notebooks-on-polyaxon' --description='Jupyter notebooks for the code samples of the book "Deep Learning with Python" on Polyaxon' + +# Init the project +polyaxon init deep-learning-with-python-notebooks-on-polyaxon + +# Start the Jupyter notebook on polyaxon with the notebooks +polyaxon notebook start -f polyaxonfile.yml -u +``` diff --git a/polyaxonfile.yml b/polyaxonfile.yml new file mode 100644 index 0000000000..039f8850ad --- /dev/null +++ b/polyaxonfile.yml @@ -0,0 +1,11 @@ +--- +version: 1 + +project: + name: deep-learning-with-python-notebooks-on-polyaxon + +run: + image: tensorflow/tensorflow:1.4.1-py3 + steps: + - pip3 install --no-cache-dir -U polyaxon-helper + - pip3 install jupyter diff --git a/polyaxonfile_gpu.yml b/polyaxonfile_gpu.yml new file mode 100644 index 0000000000..acf9d8f061 --- /dev/null +++ b/polyaxonfile_gpu.yml @@ -0,0 +1,11 @@ +--- +version: 1 + +project: + name: deep-learning-with-python-notebooks-on-polyaxon + +run: + image: tensorflow/tensorflow:1.4.1-gpu-py3 + steps: + - pip3 install --no-cache-dir -U polyaxon-helper + - pip3 install jupyter From e3e4d7e91747592149ef9133ea16d57ef18fa475 Mon Sep 17 00:00:00 2001 From: Mourad Date: Wed, 2 May 2018 15:03:57 +0200 Subject: [PATCH 2/5] Update specification file --- polyaxonfile.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/polyaxonfile.yml b/polyaxonfile.yml index 039f8850ad..dcb5df9e57 100644 --- a/polyaxonfile.yml +++ b/polyaxonfile.yml @@ -1,8 +1,7 @@ --- version: 1 -project: - name: deep-learning-with-python-notebooks-on-polyaxon +kind: plugin run: image: tensorflow/tensorflow:1.4.1-py3 From 80fe4caa6d2e53b18d3cdba69856765f7edb5dd1 Mon Sep 17 00:00:00 2001 From: Mourad Date: Wed, 2 May 2018 15:04:24 +0200 Subject: [PATCH 3/5] Update specficiation file --- polyaxonfile_gpu.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/polyaxonfile_gpu.yml b/polyaxonfile_gpu.yml index acf9d8f061..d496ab220c 100644 --- a/polyaxonfile_gpu.yml +++ b/polyaxonfile_gpu.yml @@ -1,8 +1,7 @@ --- version: 1 -project: - name: deep-learning-with-python-notebooks-on-polyaxon +kind: plugin run: image: tensorflow/tensorflow:1.4.1-gpu-py3 From 7128ad8178ca5d5da0f421039be8edcab9730e17 Mon Sep 17 00:00:00 2001 From: mouradmourafiq Date: Sun, 1 Jul 2018 22:05:49 +0200 Subject: [PATCH 4/5] Update examples --- polyaxonfile.yml | 7 +++++-- polyaxonfile_gpu.yml | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/polyaxonfile.yml b/polyaxonfile.yml index dcb5df9e57..268cb12874 100644 --- a/polyaxonfile.yml +++ b/polyaxonfile.yml @@ -1,9 +1,12 @@ --- version: 1 -kind: plugin +kind: notebook -run: +project: + name: deep-learning-with-python-notebooks-on-polyaxon + +build: image: tensorflow/tensorflow:1.4.1-py3 steps: - pip3 install --no-cache-dir -U polyaxon-helper diff --git a/polyaxonfile_gpu.yml b/polyaxonfile_gpu.yml index d496ab220c..11e9125a0b 100644 --- a/polyaxonfile_gpu.yml +++ b/polyaxonfile_gpu.yml @@ -1,9 +1,12 @@ --- version: 1 -kind: plugin +kind: notebook -run: +project: + name: deep-learning-with-python-notebooks-on-polyaxon + +build: image: tensorflow/tensorflow:1.4.1-gpu-py3 steps: - pip3 install --no-cache-dir -U polyaxon-helper From 15a8c51b370fde34c8f4b4303f68ed20bf22bf45 Mon Sep 17 00:00:00 2001 From: mouradmourafiq Date: Fri, 6 Jul 2018 01:12:22 +0200 Subject: [PATCH 5/5] Fix polyaxonfiles --- polyaxonfile.yml | 3 --- polyaxonfile_gpu.yml | 3 --- 2 files changed, 6 deletions(-) diff --git a/polyaxonfile.yml b/polyaxonfile.yml index 268cb12874..dbf385ee40 100644 --- a/polyaxonfile.yml +++ b/polyaxonfile.yml @@ -3,9 +3,6 @@ version: 1 kind: notebook -project: - name: deep-learning-with-python-notebooks-on-polyaxon - build: image: tensorflow/tensorflow:1.4.1-py3 steps: diff --git a/polyaxonfile_gpu.yml b/polyaxonfile_gpu.yml index 11e9125a0b..d40f794734 100644 --- a/polyaxonfile_gpu.yml +++ b/polyaxonfile_gpu.yml @@ -3,9 +3,6 @@ version: 1 kind: notebook -project: - name: deep-learning-with-python-notebooks-on-polyaxon - build: image: tensorflow/tensorflow:1.4.1-gpu-py3 steps: