Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] Add build pack documentation #36

Merged
merged 3 commits into from
Nov 29, 2017

Conversation

betatim
Copy link
Member

@betatim betatim commented Nov 28, 2017

This makes a start on jupyterhub/binderhub#300

@@ -19,6 +19,12 @@ This guide will help you in preparing your Dockerfile so that it has the
components needed to run JupyterHub, allowing it to work on Binder
deployments.

.. note::
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My attempt at making really sure people don't venture past this warning unless they really know what they are doing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use important directive:

.. important::

dockerfile
reproducibility
sample_repos
faq

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this into introdcution.rst because as a reader I rarely expect to find stuff below the TOC. I read the welcome blah above the TOC, then start scanning for what I am looking for, follow the link. Opinions?

@betatim
Copy link
Member Author

betatim commented Nov 28, 2017

What else is worth highlighting in doc/introduction.rst? There is a list to all the example repos we have in the docs so we don't need to repeat everything here.

@@ -0,0 +1,39 @@
Welcome to using binder!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the Binder user documentation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/shrug changed it ;)

@betatim
Copy link
Member Author

betatim commented Nov 28, 2017

Once this is merged we should add a link on the mybinder.org landing page that links to the preparing a repo section. I propose somewhere in the second bullet point where we explain the build process.

@choldgraf
Copy link
Member

Seems like a good addition to me, only one comment. Feel free to open a binderhub PR where we can discuss where to link it.

@betatim betatim changed the title [WIP] Add build pack documentation [MRG] Add build pack documentation Nov 28, 2017
@betatim
Copy link
Member Author

betatim commented Nov 28, 2017

Let's let this stew a bit to give more people a change to comment.

@betatim
Copy link
Member Author

betatim commented Nov 29, 2017

Merge?

Copy link
Contributor

@willingc willingc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @betatim. A few editing suggestions. It will be great to have this addition.

@@ -0,0 +1,39 @@
Welcome to the binder documentation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalize Binder

users of your Binder.
* One (or many) text files that specify the requirements of your code. For
example, a ``requirements.txt`` or ``environment.yml`` file. See the
below examples for a list of all the files and environments that are
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...a list of supported files and environments.

below examples for a list of all the files and environments that are
supported.

All you need to do is include the files specified above in a GitHub repository.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify, and add if needed, the files specified above to the repository.

.. note::

If a previous version of the repository has already been built, Binder will
only build a new one if the git hashes don't match. If Binder *doesn't* have
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When Binder doesn't need to build a repository, ...

computational environment is much faster.


Simple python dependencies
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python

Using python2
-------------

To use python 2.7 for your repository create a ``runtime.txt`` with
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python

.. note::

Make sure that you save your notebooks with a python2 kernel activated,
as this defines which kernel Binder will use when a notebook is opened.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The active kernel is displayed in the upper right corner of the notebook.

installed into the python3 environment.


Executing commands as part of the build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing post-build commands


You might need to run arbitrary commands at the end of the build process. Place
these in the ``postBuild`` file and make it executable. One use case is having
a repository that contains a python package and examples that use the package.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python

@@ -19,6 +19,12 @@ This guide will help you in preparing your Dockerfile so that it has the
components needed to run JupyterHub, allowing it to work on Binder
deployments.

.. note::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use important directive:

.. important::

@choldgraf
Copy link
Member

I'm +1 on merge once @willingc 's comments are addressed

@betatim
Copy link
Member Author

betatim commented Nov 29, 2017

All suggestions got applied. There is only one about pip freeze > requirements.txt where I'd like to hear what people think. But we should merge this and then change it later.

@betatim
Copy link
Member Author

betatim commented Nov 29, 2017

Thank @willingc you for fixing all that shockingly bad spelling.

@betatim
Copy link
Member Author

betatim commented Nov 29, 2017

paging Dr @choldgraf to the merge department, Dr @choldgraf ;)

@choldgraf choldgraf merged commit c4a3d4c into jupyterhub:master Nov 29, 2017
Using conda packages
--------------------

For 'complex to install' packages, like ``numpy`` or ``scikit-learn``, we
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should pick a different example now :D numpy nor scikit-learn are no longer complex to install with requirements.txt IMO :D MNE perhaps?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MNE? If you can think of something that isn't an ipywidget we can change it. I couldn't think of anything off the top of my head. gdal? but then that isn't a python package really.

Ja, damn those wheels ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hands down geopandas. anything in the geospatial analytics world sucks to install with pip. Also make sure we use conda-forge.

@betatim betatim deleted the buildpack-docs branch November 29, 2017 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants