Merge branch 'master' into shiny

pull/239/head
Carol Willing 2018-03-13 12:05:56 -07:00 zatwierdzone przez GitHub
commit e5bbd5f834
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
19 zmienionych plików z 190 dodań i 136 usunięć

Wyświetl plik

@ -24,7 +24,7 @@ make that your current directory with `cd repo2docker`.
## Set up local virtual environment
After cloning the repository (or your fork of the repo), you should set up an
isolated environment to install libraries required for running / developing
isolated environment to install libraries required for running / developing
repo2docker. There are many ways to do this, and a `virtual environment` is
one of them.
@ -90,14 +90,21 @@ py.test -s tests/<path-to-test>
# Updating libraries installed for all repos
For both the conda and virtualenv base environments, we install specific
For both the `conda` and `virtualenv` (`pip`) base environments, we install specific
pinned versions of all dependencies. We explicitly list the dependencies
we want, then *freeze* them at commit time to explicitly list all the
transitive dependencies at current versions. This way, we know that
all dependencies will have the exact same version installed at all times.
If you update a library in the base environment, you need to update it
for both the virtualenv and conda environments before submitting a PR.
To update one of the dependencies shared across all `repo2docker` builds, you
must follow these steps (with more detailed information in the sections below):
* Make sure you have [Docker](https://www.docker.com/) running on your computer
* Bump the version number in `virtualenv` ([link](https://github.com/jupyter/repo2docker/blob/master/CONTRIBUTING.md#virtualenv-dependencies))
* Bump the version number in the `conda` environment ([link](https://github.com/jupyter/repo2docker/blob/master/CONTRIBUTING.md#conda-dependencies))
* Make a pull request with your changes ([link](https://github.com/jupyter/repo2docker/blob/master/CONTRIBUTING.md#make-a-pull-request))
See the subsections below for more detailed instructions.
## Virtualenv dependencies
@ -106,22 +113,23 @@ There are two files related to virtualenv dependencies:
1. `repo2docker/buildpacks/python/requirements.txt`
Contains list of packages to install in Python3 virtualenvs,
which are the default. This should be where all Notebook versions &
notebook extensions (such as JupyterLab / nteract) go.
which are the default. **This where all Notebook versions &
notebook extensions (such as JupyterLab / nteract) go**.
2. `repo2docker/buildpacks/python/requirements2.txt`
Contains list of packages to install in Python2 virtualenvs, which
can be specifically requested by users. This only needs `IPyKernel`
and kernel related libraries - Notebook / Notebook Extension need
can be specifically requested by users. **This only needs `IPyKernel`
and kernel related libraries** - Notebook / Notebook Extension need
not be installed here.
Once you edit either of these files to add a new package / bump version on
an existing package, you should then run `./repo2docker/buildpacks/python/freeze.bash`.
After you edit either of these files to add a new package / bump version on
an existing package, run `./repo2docker/buildpacks/python/freeze.bash`.
This script will resolve dependencies and write them to the respective `.frozen.txt`
files. You will need Python3 and Python2 with virtualenv to run the script.
All the .txt files in `repo2docker/buildpacks/python/` should be comitted to git.
All the `.txt` files in `repo2docker/buildpacks/python/` should be committed to git.
## Conda dependencies
@ -130,14 +138,14 @@ There are two files related to conda dependencies:
1. `repo2docker/buildpacks/conda/environment.yml`
Contains list of packages to install in Python3 conda environments,
which are the default. This should be where all Notebook versions &
notebook extensions (such as JupyterLab / nteract) go.
which are the default. **This is where all Notebook versions &
notebook extensions (such as JupyterLab / nteract) go**.
2. `repo2docker/buildpacks/conda/environment.py-2.7.yml`
Contains list of packages to install in Python2 conda environments, which
can be specifically requested by users. This only needs `IPyKernel`
and kernel related libraries - Notebook / Notebook Extension need
can be specifically requested by users. **This only needs `IPyKernel`
and kernel related libraries** - Notebook / Notebook Extension need
not be installed here.
Once you edit either of these files to add a new package / bump version on
@ -145,14 +153,18 @@ an existing package, you should then run `./repo2docker/buildpacks/conda/freeze.
This script will resolve dependencies and write them to the respective `.frozen.yml`
files. You will need `docker` installed to run this script.
The following files should be comitted to git:
After the freeze script finishes, a number of files will have been created.
Commit the following subset of files to git:
```
repo2docker/buildpacks/conda/environment.yml
repo2docker/buildpacks/conda/environment.frozen.yml
repo2docker/buildpacks/conda/environment.py-2.7.yml
repo2docker/buildpacks/conda/environment.py-2.7.frozen.yml
repo2docker/buildpacks/conda/environment.py-3.5.frozen.yml
repo2docker/buildpacks/conda/environment.py-3.6.frozen.yml
```
- repo2docker/buildpacks/conda/environment.frozen.yml
- repo2docker/buildpacks/conda/environment.py-2.7.yml
- repo2docker/buildpacks/conda/environment.py-3.6.frozen.yml
- repo2docker/buildpacks/conda/environment.py-2.7.frozen.yml
- repo2docker/buildpacks/conda/environment.py-3.5.frozen.yml
- repo2docker/buildpacks/conda/environment.yml
## Make a Pull Request
@ -191,13 +203,13 @@ If you do not have access to any of these, please contact a current maintainer o
rm -f dist/*
python setup.py sdist bdist_wheel
```
4. Once tests pass, time to upload!
4. Once tests pass, time to upload!
```bash
twine upload dist/*
```
This might ask for your PyPI username and password.
5. Make a git tag and push it to GitHub:
```bash
git tag -a v<version>

Wyświetl plik

@ -202,7 +202,7 @@ for root, _, files in os.walk(os.path.join('..', '..', 'tests')):
continue
header = files.pop(files.index('README.rst'))
with open(os.path.join(root, header), 'r') as ff:
this_s = ff.read() + '\n'
this_s = ff.read() + '\n\n'
title = this_s.split('\n')[0]
for ifile in files:
filename = os.path.basename(ifile)

Wyświetl plik

@ -14,7 +14,7 @@ list :)
The core of `repo2docker` can be considered a
[deterministic algorithm](https://en.wikipedia.org/wiki/Deterministic_algorithm).
When given an input directory which has a particular repository checked out, it
When given an input directory which has a particular repository checked out, it
deterministically produces a Dockerfile based on the contents of the directory.
So if we run `repo2docker` on the same directory multiple times, we get the
exact same Dockerfile output.
@ -22,15 +22,36 @@ exact same Dockerfile output.
This provides a few advantages:
1. Reuse of cached built artifacts based on a repository's identity increases
efficiency and reliability. For example, if we had already run `reop2docker`
efficiency and reliability. For example, if we had already run `repo2docker`
on a git repository at a particular commit hash, we know we can just re-use
the old output, since we know it is going to be the same. This provides
massive performance & architectural advantages when building additional
tools (like BinderHub) on top of `reop2docker`.
tools (like BinderHub) on top of `repo2docker`.
2. We produce Dockerfiles that have as much in common as possible across
multiple repositories, enabling better use of the Docker build cache. This
also provides massive performance advantages.
## Reproducibility and version stability
Many ingredients go into making an image from a repository:
1. version of the base docker image
1. version of `repo2docker` itself
1. versions of the libraries installed by the repository
`repo2docker` controls the first two, the user controls the third one. The current
policy for the version of the base image is that we will keep pace with Ubuntu
releases until we reach the next release with Long Term Support (LTS). We
currently use Artful Aardvark (17.10) and the next LTS version will be
Bionic Beaver (18.04).
The version of `repo2docker` used to build an image can influence which packages
are installed by default and which features are supported during the build
process. We will periodically update those packages to keep step with releases
of jupyter notebook, jupyterlab, etc. For packages that are installed by
default but where you want to control the version we recommend you specify them
explicitly in your dependencies.
## Unix principles "do one thing well"
`repo2docker` should do one thing, and do it well. This one thing is:
@ -67,5 +88,5 @@ well.
An easy process for getting support for more languages here is to demonstrate
their value with Dockerfiles that other people can use, and then show that this
pattern is popular enough to be included inside `reop2docker`. Remember that 'yes'
pattern is popular enough to be included inside `repo2docker`. Remember that 'yes'
is forever (very hard to remove features!), but 'no' is only temporary!

Wyświetl plik

@ -149,6 +149,16 @@ class Repo2Docker(Application):
"""
return pwd.getpwuid(os.getuid()).pw_name
appendix = Unicode(
config=True,
help="""
Appendix of Dockerfile commands to run at the end of the build.
Can be used to customize the resulting image after all
standard build steps finish.
"""
)
def fetch(self, url, ref, checkout_path):
try:
for line in execute_cmd(['git', 'clone', '--recursive', url, checkout_path],
@ -309,6 +319,11 @@ class Repo2Docker(Application):
default=[]
)
argparser.add_argument(
'--appendix',
type=str,
help=self.traits()['appendix'].help,
)
return argparser
def json_excepthook(self, etype, evalue, traceback):
@ -329,6 +344,8 @@ class Repo2Docker(Application):
self.log_level = logging.DEBUG
self.load_config_file(args.config)
if args.appendix:
self.appendix = args.appendix
if os.path.exists(args.repo):
# Let's treat this as a local directory we are building
@ -559,6 +576,8 @@ class Repo2Docker(Application):
else:
picked_buildpack = self.default_buildpack()
picked_buildpack.appendix = self.appendix
self.log.debug(picked_buildpack.render(),
extra=dict(phase='building'))

Wyświetl plik

@ -3,7 +3,6 @@ import jinja2
import tarfile
import io
import os
import stat
import re
import logging
import docker
@ -107,14 +106,21 @@ LABEL {{k}}={{v}}
# We always want containers to run as non-root
USER ${NB_USER}
# Make sure that postBuild scripts are marked executable before executing them
{% if post_build_scripts -%}
{% for s in post_build_scripts -%}
RUN ./{{ s }}
RUN chmod +x {{ s }} && ./{{ s }}
{% endfor %}
{% endif -%}
"""
DOC_URL = "http://repo2docker.readthedocs.io/en/latest/samples.html"
# Specify the default command to run
CMD ["jupyter", "notebook", "--ip", "0.0.0.0"]
{% if appendix -%}
# Appendix:
{{ appendix }}
{% endif %}
"""
class BuildPack:
@ -136,6 +142,7 @@ class BuildPack:
def __init__(self):
self.log = logging.getLogger('repo2docker')
self.appendix = ''
def get_packages(self):
"""
@ -309,6 +316,7 @@ class BuildPack:
build_script_files=self.get_build_script_files(),
base_packages=sorted(self.get_base_packages()),
post_build_scripts=self.get_post_build_scripts(),
appendix=self.appendix,
)
def build(self, image_spec, memory_limit, build_args):
@ -409,9 +417,5 @@ class BaseImage(BuildPack):
def get_post_build_scripts(self):
post_build = self.binder_path('postBuild')
if os.path.exists(post_build):
if not stat.S_IXUSR & os.stat(post_build).st_mode:
raise ValueError("%s is not executable, see %s for help." % (
post_build,
DOC_URL+'#system-post-build-scripts'))
return [post_build]
return []

Wyświetl plik

@ -117,8 +117,9 @@ class CondaBuildPack(BaseImage):
assembly_scripts.append((
'${NB_USER}',
r"""
conda env update -v -n {} -f "{}" && \
conda clean -tipsy
conda env update -n {0} -f "{1}" && \
conda clean -tipsy && \
conda list -n {0}
""".format(env_name, environment_yml)
))
return super().get_assemble_scripts() + assembly_scripts

Wyświetl plik

@ -1,29 +1,29 @@
# AUTO GENERATED FROM environment.py-3.6.yml, DO NOT MANUALLY MODIFY
# Frozen on 2018-02-08 08:10:01 UTC
# Frozen on 2018-03-07 21:59:06 UTC
name: r2d
channels:
- conda-forge
- defaults
- conda-forge/label/broken
dependencies:
- bleach=2.0.0=py_1
- ca-certificates=2017.11.5=0
- certifi=2017.11.5=py36_0
- decorator=4.1.2=py36_0
- bleach=2.1.3=py_0
- ca-certificates=2018.1.18=0
- certifi=2018.1.18=py36_0
- decorator=4.2.1=py36_0
- entrypoints=0.2.3=py36_1
- gmp=6.1.2=0
- html5lib=1.0.1=py_0
- ipykernel=4.8.0=py36_0
- ipykernel=4.8.2=py36_0
- ipython=6.2.1=py36_1
- ipython_genutils=0.2.0=py36_0
- ipywidgets=6.0.1=py36_0
- ipywidgets=7.1.1=py36_0
- jedi=0.11.1=py36_0
- jinja2=2.10=py36_0
- jsonschema=2.6.0=py36_1
- jupyter_client=5.2.2=py36_0
- jupyter_core=4.4.0=py_0
- jupyterlab=0.31.5=py36_1
- jupyterlab_launcher=0.10.3=py36_0
- jupyterlab_launcher=0.10.5=py36_0
- libsodium=1.0.15=1
- markupsafe=1.0=py36_0
- mistune=0.8.3=py_0
@ -32,10 +32,10 @@ dependencies:
- ncurses=5.9=10
- notebook=5.4.0=py36_0
- openssl=1.0.2n=0
- pandoc=2.1.1=0
- pandoc=2.1.2=0
- pandocfilters=1.4.1=py36_0
- parso=0.1.1=py_0
- pexpect=4.3.1=py36_0
- pexpect=4.4.0=py36_0
- pickleshare=0.7.4=py36_0
- pip=9.0.1=py36_1
- prompt_toolkit=1.0.15=py36_0
@ -43,10 +43,10 @@ dependencies:
- pygments=2.2.0=py36_0
- python=3.6.4=0
- python-dateutil=2.6.1=py36_0
- pyzmq=16.0.2=py36_3
- pyzmq=17.0.0=py36_3
- readline=7.0=0
- send2trash=1.4.2=py_0
- setuptools=38.4.0=py36_0
- send2trash=1.5.0=py_0
- setuptools=38.5.2=py36_0
- simplegeneric=0.8.1=py36_0
- six=1.11.0=py36_1
- sqlite=3.20.1=2
@ -58,11 +58,11 @@ dependencies:
- wcwidth=0.1.7=py36_0
- webencodings=0.5=py36_0
- wheel=0.30.0=py36_2
- widgetsnbextension=2.0.1=py36_0
- widgetsnbextension=3.1.4=py36_0
- xz=5.2.3=0
- zeromq=4.2.1=1
- zeromq=4.2.3=2
- zlib=1.2.11=0
- pip:
- nteract-on-jupyter==1.4.0
- nteract-on-jupyter==1.5.0
prefix: /opt/conda/envs/r2d

Wyświetl plik

@ -1,5 +1,5 @@
# AUTO GENERATED FROM environment.py-2.7.yml, DO NOT MANUALLY MODIFY
# Frozen on 2018-02-08 08:02:45 UTC
# Frozen on 2018-03-07 21:54:33 UTC
name: r2d
channels:
- conda-forge
@ -9,9 +9,9 @@ dependencies:
- backports=1.0=py27_1
- backports.shutil_get_terminal_size=1.0.0=py_3
- backports_abc=0.5=py27_0
- ca-certificates=2017.11.5=0
- certifi=2017.11.5=py27_0
- decorator=4.1.2=py27_0
- ca-certificates=2018.1.18=0
- certifi=2018.1.18=py27_0
- decorator=4.2.1=py27_0
- enum34=1.1.6=py27_1
- ipykernel=4.7.0=py27_0
- ipython=5.5.0=py27_0
@ -22,7 +22,7 @@ dependencies:
- ncurses=5.9=10
- openssl=1.0.2n=0
- pathlib2=2.3.0=py27_0
- pexpect=4.3.1=py27_0
- pexpect=4.4.0=py27_0
- pickleshare=0.7.4=py27_0
- pip=9.0.1=py27_1
- prompt_toolkit=1.0.15=py27_0
@ -30,10 +30,10 @@ dependencies:
- pygments=2.2.0=py27_0
- python=2.7.14=4
- python-dateutil=2.6.1=py27_0
- pyzmq=16.0.2=py27_3
- pyzmq=17.0.0=py27_3
- readline=7.0=0
- scandir=1.6=py27_0
- setuptools=38.4.0=py27_0
- scandir=1.7=py27_0
- setuptools=38.5.2=py27_0
- simplegeneric=0.8.1=py27_0
- singledispatch=3.4.0.3=py27_0
- six=1.11.0=py27_1
@ -44,7 +44,7 @@ dependencies:
- traitlets=4.3.2=py27_0
- wcwidth=0.1.7=py27_0
- wheel=0.30.0=py27_2
- zeromq=4.2.1=1
- zeromq=4.2.3=2
- zlib=1.2.11=0
- pip:
- backports.ssl-match-hostname==3.5.0.1

Wyświetl plik

@ -1,29 +1,29 @@
# AUTO GENERATED FROM environment.py-3.5.yml, DO NOT MANUALLY MODIFY
# Frozen on 2018-02-08 08:05:55 UTC
# Frozen on 2018-03-07 21:55:56 UTC
name: r2d
channels:
- conda-forge
- defaults
- conda-forge/label/broken
dependencies:
- bleach=2.0.0=py_1
- ca-certificates=2017.11.5=0
- certifi=2017.11.5=py35_0
- decorator=4.1.2=py35_0
- bleach=2.1.3=py_0
- ca-certificates=2018.1.18=0
- certifi=2018.1.18=py35_0
- decorator=4.2.1=py35_0
- entrypoints=0.2.3=py35_1
- gmp=6.1.2=0
- html5lib=1.0.1=py_0
- ipykernel=4.8.0=py35_0
- ipykernel=4.8.2=py35_0
- ipython=6.2.1=py35_1
- ipython_genutils=0.2.0=py35_0
- ipywidgets=6.0.1=py35_0
- ipywidgets=7.1.1=py35_0
- jedi=0.11.1=py35_0
- jinja2=2.10=py35_0
- jsonschema=2.6.0=py35_1
- jupyter_client=5.2.2=py35_0
- jupyter_core=4.4.0=py_0
- jupyterlab=0.31.5=py35_1
- jupyterlab_launcher=0.10.3=py35_0
- jupyterlab_launcher=0.10.5=py35_0
- libsodium=1.0.15=1
- markupsafe=1.0=py35_0
- mistune=0.8.3=py_0
@ -32,21 +32,21 @@ dependencies:
- ncurses=5.9=10
- notebook=5.4.0=py35_0
- openssl=1.0.2n=0
- pandoc=2.1.1=0
- pandoc=2.1.2=0
- pandocfilters=1.4.1=py35_0
- parso=0.1.1=py_0
- pexpect=4.3.1=py35_0
- pexpect=4.4.0=py35_0
- pickleshare=0.7.4=py35_0
- pip=9.0.1=py35_1
- prompt_toolkit=1.0.15=py35_0
- ptyprocess=0.5.2=py35_0
- pygments=2.2.0=py35_0
- python=3.5.4=3
- python=3.5.5=0
- python-dateutil=2.6.1=py35_0
- pyzmq=16.0.2=py35_3
- pyzmq=17.0.0=py35_3
- readline=7.0=0
- send2trash=1.4.2=py_0
- setuptools=38.4.0=py35_0
- send2trash=1.5.0=py_0
- setuptools=38.5.2=py35_0
- simplegeneric=0.8.1=py35_0
- six=1.11.0=py35_1
- sqlite=3.20.1=2
@ -58,11 +58,11 @@ dependencies:
- wcwidth=0.1.7=py35_0
- webencodings=0.5=py35_0
- wheel=0.30.0=py35_2
- widgetsnbextension=2.0.1=py35_0
- widgetsnbextension=3.1.4=py35_0
- xz=5.2.3=0
- zeromq=4.2.1=1
- zeromq=4.2.3=2
- zlib=1.2.11=0
- pip:
- nteract-on-jupyter==1.4.0
- nteract-on-jupyter==1.5.0
prefix: /opt/conda/envs/r2d

Wyświetl plik

@ -1,29 +1,29 @@
# AUTO GENERATED FROM environment.py-3.6.yml, DO NOT MANUALLY MODIFY
# Frozen on 2018-02-08 08:10:01 UTC
# Frozen on 2018-03-07 21:59:06 UTC
name: r2d
channels:
- conda-forge
- defaults
- conda-forge/label/broken
dependencies:
- bleach=2.0.0=py_1
- ca-certificates=2017.11.5=0
- certifi=2017.11.5=py36_0
- decorator=4.1.2=py36_0
- bleach=2.1.3=py_0
- ca-certificates=2018.1.18=0
- certifi=2018.1.18=py36_0
- decorator=4.2.1=py36_0
- entrypoints=0.2.3=py36_1
- gmp=6.1.2=0
- html5lib=1.0.1=py_0
- ipykernel=4.8.0=py36_0
- ipykernel=4.8.2=py36_0
- ipython=6.2.1=py36_1
- ipython_genutils=0.2.0=py36_0
- ipywidgets=6.0.1=py36_0
- ipywidgets=7.1.1=py36_0
- jedi=0.11.1=py36_0
- jinja2=2.10=py36_0
- jsonschema=2.6.0=py36_1
- jupyter_client=5.2.2=py36_0
- jupyter_core=4.4.0=py_0
- jupyterlab=0.31.5=py36_1
- jupyterlab_launcher=0.10.3=py36_0
- jupyterlab_launcher=0.10.5=py36_0
- libsodium=1.0.15=1
- markupsafe=1.0=py36_0
- mistune=0.8.3=py_0
@ -32,10 +32,10 @@ dependencies:
- ncurses=5.9=10
- notebook=5.4.0=py36_0
- openssl=1.0.2n=0
- pandoc=2.1.1=0
- pandoc=2.1.2=0
- pandocfilters=1.4.1=py36_0
- parso=0.1.1=py_0
- pexpect=4.3.1=py36_0
- pexpect=4.4.0=py36_0
- pickleshare=0.7.4=py36_0
- pip=9.0.1=py36_1
- prompt_toolkit=1.0.15=py36_0
@ -43,10 +43,10 @@ dependencies:
- pygments=2.2.0=py36_0
- python=3.6.4=0
- python-dateutil=2.6.1=py36_0
- pyzmq=16.0.2=py36_3
- pyzmq=17.0.0=py36_3
- readline=7.0=0
- send2trash=1.4.2=py_0
- setuptools=38.4.0=py36_0
- send2trash=1.5.0=py_0
- setuptools=38.5.2=py36_0
- simplegeneric=0.8.1=py36_0
- six=1.11.0=py36_1
- sqlite=3.20.1=2
@ -58,11 +58,11 @@ dependencies:
- wcwidth=0.1.7=py36_0
- webencodings=0.5=py36_0
- wheel=0.30.0=py36_2
- widgetsnbextension=2.0.1=py36_0
- widgetsnbextension=3.1.4=py36_0
- xz=5.2.3=0
- zeromq=4.2.1=1
- zeromq=4.2.3=2
- zlib=1.2.11=0
- pip:
- nteract-on-jupyter==1.4.0
- nteract-on-jupyter==1.5.0
prefix: /opt/conda/envs/r2d

Wyświetl plik

@ -1,7 +1,8 @@
dependencies:
- python=3.6.*
- ipywidgets==6.0.1
- ipywidgets==7.1.1
- jupyterlab==0.31.5
- tornado==4.5.3
- notebook==5.4.0
- pip:
- nteract_on_jupyter==1.4.0
- nteract_on_jupyter==1.5.0

Wyświetl plik

@ -8,7 +8,7 @@ class LegacyBinderDockerBuildPack(DockerBuildPack):
dockerfile = '._binder.Dockerfile'
dockerfile_appendix = dedent(r"""
legacy_appendix = dedent(r"""
USER root
COPY . /home/main/notebooks
RUN chown -R main:main /home/main/notebooks
@ -27,7 +27,7 @@ class LegacyBinderDockerBuildPack(DockerBuildPack):
def render(self):
with open('Dockerfile') as f:
return f.read() + self.dockerfile_appendix
return '\n'.join([f.read(), self.legacy_appendix, self.appendix, ''])
def build(self, image_spec, memory_limit, build_args):
with open(self.dockerfile, 'w') as f:

Wyświetl plik

@ -1,36 +1,36 @@
# AUTO GENERATED FROM requirements.txt, DO NOT MANUALLY MODIFY
# Frozen on Thu 8 Feb 2018 09:22:43 UTC
bleach==2.1.2
# Frozen on Wed Mar 7 21:53:43 UTC 2018
bleach==2.1.3
decorator==4.2.1
entrypoints==0.2.3
html5lib==1.0.1
ipykernel==4.8.0
ipykernel==4.8.2
ipython-genutils==0.2.0
ipython==6.2.1
ipywidgets==6.0.1
ipywidgets==7.1.1
jedi==0.11.1
Jinja2==2.10
jsonschema==2.6.0
jupyter-client==5.2.2
jupyter-core==4.4.0
jupyterlab-launcher==0.10.3
jupyterlab-launcher==0.10.5
jupyterlab==0.31.5
MarkupSafe==1.0
mistune==0.8.3
nbconvert==5.3.1
nbformat==4.4.0
notebook==5.4.0
nteract-on-jupyter==1.4.0
nteract-on-jupyter==1.5.0
pandocfilters==1.4.2
parso==0.1.1
pexpect==4.3.1
pexpect==4.4.0
pickleshare==0.7.4
prompt-toolkit==1.0.15
ptyprocess==0.5.2
Pygments==2.2.0
python-dateutil==2.6.1
pyzmq==16.0.4
Send2Trash==1.4.2
pyzmq==17.0.0
Send2Trash==1.5.0
simplegeneric==0.8.1
six==1.11.0
terminado==0.8.1
@ -39,4 +39,4 @@ tornado==4.5.3
traitlets==4.3.2
wcwidth==0.1.7
webencodings==0.5.1
widgetsnbextension==2.0.1
widgetsnbextension==3.1.4

Wyświetl plik

@ -1,4 +1,5 @@
notebook==5.4.0
ipywidgets==6.0.1
tornado==4.5.3
ipywidgets==7.1.1
jupyterlab==0.31.5
nteract_on_jupyter==1.4.0
nteract_on_jupyter==1.5.0

Wyświetl plik

@ -1,27 +1,27 @@
# AUTO GENERATED FROM requirements2.txt, DO NOT MANUALLY MODIFY
# Frozen on Thu 8 Feb 2018 09:23:20 UTC
# Frozen on Wed Mar 7 21:54:06 UTC 2018
backports-abc==0.5
backports.shutil-get-terminal-size==1.0.0
certifi==2018.1.18
decorator==4.2.1
enum34==1.1.6
futures==3.2.0
ipykernel==4.6.1
ipython-genutils==0.2.0
ipython==5.5.0
jupyter-client==5.2.2
jupyter-core==4.4.0
pathlib2==2.3.0
pexpect==4.3.1
pexpect==4.4.0
pickleshare==0.7.4
prompt-toolkit==1.0.15
ptyprocess==0.5.2
Pygments==2.2.0
python-dateutil==2.6.1
pyzmq==16.0.4
scandir==1.6
pyzmq==17.0.0
scandir==1.7
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.11.0
tornado==4.5.3
tornado==5.0
traitlets==4.3.2
wcwidth==0.1.7

Wyświetl plik

@ -62,7 +62,11 @@ class LocalRepo(pytest.File):
def collect(self):
yield Repo2DockerTest(
self.fspath.basename, self,
args=[self.fspath.dirname, './verify'],
args=[
'--appendix', 'RUN echo "appendix" > /tmp/appendix',
self.fspath.dirname,
'./verify',
],
)

Wyświetl plik

@ -37,7 +37,7 @@ def does_build(builddir, mem_limit, mem_allocate_mb):
except subprocess.CalledProcessError as e:
output = e.output.decode()
print(output)
if "The command '/bin/sh -c ./postBuild' returned a non-zero code: 137" in output:
if "/postBuild' returned a non-zero code: 137" in output:
return False
else:
raise

Wyświetl plik

@ -2,5 +2,8 @@
# Verify that the default just provides a py3 environment with jupyter
import sys
assert sys.version_info[:2] == (3, 6)
assert sys.version_info[:2] == (3, 6), sys.version
import jupyter
with open('/tmp/appendix') as f:
assert f.read().strip() == 'appendix'

Wyświetl plik

@ -4,16 +4,4 @@ System - Post-build scripts
It is possible to run scripts after you've built the environment specified in
your other files. This could be used to, for example, download data or run
some configuration scripts. For example, this will download and install a
Jupyter extension.
.. note::
This file needs to be executable in order to work with ``repo2docker``. If
you're on Linux or macOS, run::
chmod +x postBuild
If you're on windows, you can accomplish the same behavior with this
``git`` command::
git update-index --chmod=+x postBuild
Jupyter extension.