kopia lustrzana https://github.com/jupyterhub/repo2docker
improving readmes for tests
rodzic
8c22e42ee4
commit
30b37a35e4
|
@ -1,4 +0,0 @@
|
||||||
Binder Directory
|
|
||||||
----------------
|
|
||||||
|
|
||||||
top-level Dockerfile will be ignored if binder directory exists.
|
|
|
@ -1,8 +1,9 @@
|
||||||
Conda - Mixed Requirements
|
Conda - Mixed Requirements
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
An ``environment.yml`` takes precedence over ``requirements.txt``.
|
An ``environment.yml`` file takes precedence over ``requirements.txt``.
|
||||||
To install Python packages into a conda environment with pip, use the ``pip`` key in ``environment.yml``:
|
To install Python packages into a conda environment with pip, use the
|
||||||
|
``pip`` key in ``environment.yml``:
|
||||||
|
|
||||||
.. sourcecode:: yaml
|
.. sourcecode:: yaml
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
Conda Environment
|
Conda Environment and Python 2
|
||||||
-----------------
|
------------------------------
|
||||||
|
|
||||||
Conda environments files may allow for more complex builds and dependencies. You
|
``environment.yml`` is the standard method for defining environments with the
|
||||||
can specify them in the standard `environment.yml` files.
|
Anaconda (conda) distribution. Conda environment files may allow for more
|
||||||
|
complex builds and dependencies than are possible with a single
|
||||||
|
``requirements.txt`` file.
|
||||||
|
|
||||||
|
This example shows how to define a Python 2 environment with Anaconda. You can
|
||||||
|
define any version of Python that Anaconda supports.
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
Conda Environment
|
Conda Environment
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
Conda environments files may allow for more complex builds and dependencies. You
|
``environment.yml`` is the standard method for defining environments with the
|
||||||
can specify them in the standard `environment.yml` files.
|
Anaconda (conda) distribution. Conda environment files may allow for more
|
||||||
|
complex builds and dependencies than are possible with a single
|
||||||
|
``requirements.txt`` file.
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
Binder Directory
|
|
||||||
----------------
|
|
||||||
|
|
||||||
A top-level Dockerfile will be ignored if a ``binder`` directory exists.
|
|
|
@ -1,7 +1,9 @@
|
||||||
Docker - Specifying dependencies
|
Docker - Specifying dependencies
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
You can specify dependencies with Dockerfiles, which may be more flexible
|
You can use a Dockerfiles to use a "source" Docker image that has a pre-built
|
||||||
in running non-standard code. We recommend sourcing your Dockerfile from
|
environment. This may be more flexible in running non-standard code.
|
||||||
one of the Jupyter base images. In this case, we use a stripped-down image
|
|
||||||
that has minimal dependencies installed.
|
We recommend sourcing your Dockerfile from one of the Jupyter base images
|
||||||
|
to ensure that it works with JupyterHub. In this case, we use a stripped-down
|
||||||
|
image that has minimal dependencies installed.
|
||||||
|
|
|
@ -4,4 +4,5 @@ Docker - Legacy Dockerfiles
|
||||||
This demonstrates the Dockerfile syntax that was often found in the first
|
This demonstrates the Dockerfile syntax that was often found in the first
|
||||||
version of Binder. It sources the ``andrewosh`` Docker image, which
|
version of Binder. It sources the ``andrewosh`` Docker image, which
|
||||||
contained many different dependencies, then installs Julia. We encourage
|
contained many different dependencies, then installs Julia. We encourage
|
||||||
users to source one of the Jupyter base images as they are more streamlined.
|
users to source one of the Jupyter base images as they are more streamlined,
|
||||||
|
reliable, and efficient.
|
||||||
|
|
|
@ -2,6 +2,8 @@ Docker - Running scripts
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
It's possible to run scripts using Docker in your build. In this case, we run
|
It's possible to run scripts using Docker in your build. In this case, we run
|
||||||
a simple shell script after installing dependencies. However, we recommend
|
a simple shell script after installing dependencies.
|
||||||
that you see if it's possible to accomplish what you want using ``apt`` and
|
|
||||||
``postInstall`` files, and use Dockerfiles only when necessary.
|
While it's possible to run code with Dockerfiles, we recommend
|
||||||
|
that try accomplishing the same thing with ``apt.txt`` and
|
||||||
|
``postBuild`` files. Only use Dockerfiles when necessary.
|
||||||
|
|
|
@ -1,7 +1,17 @@
|
||||||
Julia - REQUIRE
|
Julia - REQUIRE
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
The simplest way to specify dependencies in Julia, a REQUIRE file simply
|
To specify dependencies in Julia, include a REQUIRE file that lists the names
|
||||||
lists the names of packages. Each one will be installed but not pre-compiled.
|
of packages you'd like to be installed. For example:
|
||||||
In this case, we also specify python dependencies with an ``environment.yml``
|
|
||||||
file.
|
```
|
||||||
|
PyPlot
|
||||||
|
IJulia
|
||||||
|
DataFrames
|
||||||
|
```
|
||||||
|
|
||||||
|
Each one will be installed but **not** pre-compiled. If you'd like to
|
||||||
|
pre-compile your Julia packages, consider using a ``postBuild`` file.
|
||||||
|
|
||||||
|
Note that this example also specifies Python dependencies with an
|
||||||
|
``environment.yml`` file.
|
||||||
|
|
|
@ -2,4 +2,9 @@ System - APT Packages
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
It is possible to install packages using the Shell with the ``apt.txt`` file.
|
It is possible to install packages using the Shell with the ``apt.txt`` file.
|
||||||
In this case we install ``gfortran`` which does not have an easy Python install.
|
This allows you to install libraries that aren't easy to install with package
|
||||||
|
managers such as ``pip`` or ``conda``. This can be useful if you must install
|
||||||
|
something that depends on a low-level library already being present.
|
||||||
|
|
||||||
|
In this case we install ``gfortran``, which does not have an easy Python
|
||||||
|
install.
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
Binder Directory
|
Binder Directory for configuration files
|
||||||
----------------
|
----------------------------------------
|
||||||
|
|
||||||
top-level environment.yml will be ignored if binder directory exists.
|
If a directory called ``binder/`` exists in the top level of the repository,
|
||||||
|
then all configuration files that are **not** in ``binder/`` will be ignored.
|
||||||
|
This is particularly useful if you have a ``Dockerfile`` defined in a
|
||||||
|
repository, but don't want ``repo2docker``to use it for building the
|
||||||
|
environment.
|
||||||
|
|
|
@ -2,4 +2,4 @@ Python - Requirements.txt
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
The simplest way to specify Python packages is with a ``requirements.txt`` file
|
The simplest way to specify Python packages is with a ``requirements.txt`` file
|
||||||
that is compatible with ``pip install``.
|
that is compatible with ``pip install``. In this case, we install ``numpy``.
|
||||||
|
|
|
@ -3,5 +3,6 @@ System - Post-build scripts
|
||||||
|
|
||||||
It is possible to run scripts after you've built the environment specified in
|
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
|
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
|
some configuration scripts.
|
||||||
Jupyter extension.
|
|
||||||
|
In this example, we download and install a Jupyter Notebook extension.
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
System - Specifying runtime environments
|
|
||||||
----------------------------------------
|
|
||||||
|
|
||||||
You can specify runtime environments (such as Python 2 or 3) with a
|
|
||||||
``runtime.txt`` file.
|
|
|
@ -2,8 +2,19 @@ System - Specifying runtime environments
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
You can specify runtime environments (such as Python 2 or 3) with a
|
You can specify runtime environments (such as Python 2 or 3) with a
|
||||||
``runtime.txt`` file.
|
``runtime.txt`` file. To do so, include a line of the following form in
|
||||||
|
your ``runtime.txt`` file:
|
||||||
|
|
||||||
|
```
|
||||||
|
python-N
|
||||||
|
```
|
||||||
|
|
||||||
|
Where ``N`` is either ``2`` or ``3``. If ``N==2``, Python 2.7 will be used.
|
||||||
|
If ``N==3``, Python 3.6 will be used.
|
||||||
|
|
||||||
This is an example that selects Python 3. Currently you can not use
|
This is an example that selects Python 3. Currently you can not use
|
||||||
this to select a sepcific version of Python 3 (e.g. 3.4 vs 3.6). If you
|
this to select a specific version of Python 3 (e.g. 3.4 vs 3.6). If you
|
||||||
need this level of control we recommend you use a `environment.yml`.
|
need this level of control we recommend you use a `environment.yml`.
|
||||||
|
|
||||||
|
Note that you can also install Python environments using the Anaconda
|
||||||
|
distribution by using an ``environment.yml`` file.
|
||||||
|
|
Ładowanie…
Reference in New Issue