2017-12-07 18:50:46 +00:00
|
|
|
.. _install:
|
|
|
|
|
|
|
|
Installing ``repo2docker``
|
|
|
|
==========================
|
|
|
|
|
2018-07-02 00:27:39 +00:00
|
|
|
repo2docker requires Python 3.4 and above on Linux and macOS. See
|
|
|
|
:ref:`below <windows>` for more information about Windows support.
|
|
|
|
|
2018-03-15 15:39:23 +00:00
|
|
|
Prerequisite: docker
|
|
|
|
--------------------
|
2017-12-07 18:50:46 +00:00
|
|
|
|
2018-07-02 00:27:39 +00:00
|
|
|
Install `Docker <https://www.docker.com>`_ as it is required
|
|
|
|
to build Docker images. The
|
|
|
|
`Community Edition <https://www.docker.com/community-edition>`_,
|
|
|
|
is available for free.
|
|
|
|
|
|
|
|
Recent versions of Docker are recommended.
|
|
|
|
The latest version of Docker, ``18.03``, successfully builds repositories from
|
|
|
|
`binder-examples <https://github.com/binder-examples>`_.
|
|
|
|
The `BinderHub <https://binderhub.readthedocs.io/>`_ helm chart uses version
|
|
|
|
``17.11.0-ce-dind``. See the
|
|
|
|
`helm chart <https://github.com/jupyterhub/binderhub/blob/master/helm-chart/binderhub/values.yaml#L167>`_
|
|
|
|
for more details.
|
2018-03-15 15:39:23 +00:00
|
|
|
|
|
|
|
Installing with ``pip``
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
We recommend installing ``repo2docker`` with the ``pip`` tool::
|
2017-12-07 18:50:46 +00:00
|
|
|
|
2017-12-08 19:53:15 +00:00
|
|
|
python3 -m pip install jupyter-repo2docker
|
2017-12-07 18:50:46 +00:00
|
|
|
|
2017-12-08 19:53:15 +00:00
|
|
|
For infomation on using ``repo2docker``, see :ref:`usage`.
|
|
|
|
|
2018-03-15 15:39:23 +00:00
|
|
|
Installing from source code
|
|
|
|
---------------------------
|
2017-12-08 19:53:15 +00:00
|
|
|
|
|
|
|
Alternatively, you can install repo2docker from source,
|
|
|
|
i.e. if you are contributing back to this project::
|
2017-12-07 18:50:46 +00:00
|
|
|
|
|
|
|
git clone https://github.com/jupyter/repo2docker.git
|
|
|
|
cd repo2docker
|
|
|
|
pip install -e .
|
|
|
|
|
|
|
|
That's it! For information on using ``repo2docker``, see
|
|
|
|
:ref:`usage`.
|
2018-03-15 15:39:23 +00:00
|
|
|
|
2018-07-02 00:27:39 +00:00
|
|
|
.. _windows:
|
|
|
|
|
|
|
|
Windows support
|
|
|
|
---------------
|
2018-03-15 15:39:23 +00:00
|
|
|
|
2018-07-05 18:25:43 +00:00
|
|
|
Windows support for ``repo2docker`` is still in the experimental stage.
|
2018-03-15 15:39:23 +00:00
|
|
|
|
|
|
|
An article about `using Windows and the WSL`_ (Windows Subsytem for Linux or
|
|
|
|
Bash on Windows) provides additional information about Windows and docker.
|
|
|
|
|
|
|
|
|
|
|
|
.. _using Windows and the WSL: https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly
|
2018-07-02 00:27:39 +00:00
|
|
|
|
2018-07-02 05:15:43 +00:00
|
|
|
.. _jupyterhub:
|
|
|
|
|
2018-07-02 00:27:39 +00:00
|
|
|
JupyterHub-ready images
|
|
|
|
-----------------------
|
|
|
|
|
2018-07-02 05:15:43 +00:00
|
|
|
`JupyterHub <https://jupyterhub.readthedocs.io/en/stable/>`_ allows multiple
|
|
|
|
users to collaborate on a shared Jupyter server. ``repo2docker`` can build
|
2018-07-05 18:25:43 +00:00
|
|
|
Docker images that can be shared within a JupyterHub deployment. For example,
|
|
|
|
`mybinder.org <https://mybinder.org>`_ uses JupyterHub and ``repo2docker``
|
|
|
|
to allow anyone to build a Docker image of a git repository online and
|
|
|
|
share an executable version of the repository with a URL to the built image.
|
2018-07-02 05:15:43 +00:00
|
|
|
|
2018-07-02 00:27:39 +00:00
|
|
|
To build `JupyterHub <https://github.com/jupyterhub/jupyterhub>`_-ready
|
|
|
|
Docker images with ``repo2docker``, the version of your JupterHub deployment
|
|
|
|
must be included in the ``environment.yml`` or ``requiements.txt`` of the
|
|
|
|
git repositories you build.
|
2018-07-05 18:46:06 +00:00
|
|
|
|
|
|
|
If your instance of JupyterHub uses ``DockerSpawner``, you will need to set its
|
|
|
|
command to run ``jupyterhub-singleuser`` by adding this line in your
|
|
|
|
configuration file::
|
|
|
|
|
|
|
|
c.DockerSpawner.cmd = ['jupyterhub-singleuser']
|