2017-12-07 18:50:46 +00:00
|
|
|
.. _install:
|
|
|
|
|
|
|
|
Installing ``repo2docker``
|
|
|
|
==========================
|
|
|
|
|
2020-09-07 06:02:09 +00:00
|
|
|
repo2docker requires Python 3.6 or above on Linux and macOS. See
|
2018-07-02 00:27:39 +00:00
|
|
|
:ref:`below <windows>` for more information about Windows support.
|
|
|
|
|
2018-09-17 23:19:50 +00:00
|
|
|
Prerequisite: Docker
|
2018-03-15 15:39:23 +00:00
|
|
|
--------------------
|
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
|
2019-06-25 08:42:47 +00:00
|
|
|
`Community Edition <https://docs.docker.com/install/>`_,
|
2018-07-02 00:27:39 +00:00
|
|
|
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
|
2021-07-24 10:09:43 +00:00
|
|
|
`helm chart <https://github.com/jupyterhub/binderhub/blob/HEAD/helm-chart/binderhub/values.yaml#L167>`_
|
2018-07-02 00:27:39 +00:00
|
|
|
for more details.
|
2018-03-15 15:39:23 +00:00
|
|
|
|
2020-09-10 22:10:55 +00:00
|
|
|
Optional: Mercurial
|
|
|
|
-------------------
|
|
|
|
|
2020-09-14 12:05:52 +00:00
|
|
|
For `Mercurial <https://www.mercurial-scm.org>`_ repositories, Mercurial and
|
|
|
|
`hg-evolve <https://www.mercurial-scm.org/doc/evolution/>`_ need to be
|
|
|
|
installed. For example, on Debian based distributions, one can do::
|
|
|
|
|
|
|
|
sudo apt install mercurial
|
|
|
|
$(hg debuginstall --template "{pythonexe}") -m pip install hg-evolve --user
|
|
|
|
|
|
|
|
To install Mercurial on other systems, see `here
|
|
|
|
<https://www.mercurial-scm.org/download>`_.
|
|
|
|
|
|
|
|
Note that for old Mercurial versions, you may need to specify a version for
|
|
|
|
hg-evolve. For example, ``hg-evolve==9.2`` for hg 4.5 (which is installed with
|
|
|
|
`apt` on Ubuntu 18.4).
|
2020-09-10 22:10:55 +00:00
|
|
|
|
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
|
|
|
|
2019-02-20 11:37:48 +00:00
|
|
|
for the latest release. To install the most recent code from the upstream repository, run::
|
|
|
|
|
2020-08-10 07:33:05 +00:00
|
|
|
python3 -m pip install https://github.com/jupyterhub/repo2docker/archive/master.zip
|
2019-02-20 11:37:48 +00:00
|
|
|
|
2018-08-20 11:09:20 +00:00
|
|
|
For information on using ``repo2docker``, see :ref:`usage`.
|
2017-12-08 19:53:15 +00:00
|
|
|
|
2018-03-15 15:39:23 +00:00
|
|
|
Installing from source code
|
|
|
|
---------------------------
|
2017-12-08 19:53:15 +00:00
|
|
|
|
2019-02-20 11:37:48 +00:00
|
|
|
Alternatively, you can install repo2docker from a local source tree,
|
|
|
|
e.g. in case you are contributing back to this project::
|
2017-12-07 18:50:46 +00:00
|
|
|
|
2020-08-10 07:33:05 +00:00
|
|
|
git clone https://github.com/jupyterhub/repo2docker.git
|
2017-12-07 18:50:46 +00:00
|
|
|
cd repo2docker
|
2019-02-20 11:37:48 +00:00
|
|
|
python3 -m pip install -e .
|
2017-12-07 18:50:46 +00:00
|
|
|
|
|
|
|
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
|