-
Notifications
You must be signed in to change notification settings - Fork 385
Revamp our documentation and refactor a bit #1433
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
63026f5
Revamp our documentation
choldgraf d689bfe
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b976d17
Update documentation with new content
choldgraf 9402966
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] eeb8a1c
Sphinx design
choldgraf 732a647
Address comments
choldgraf d3a8e30
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] aae1c6c
Address comments
choldgraf ee2373b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 2aceb43
Data and interactive
choldgraf 8e4b0a0
typos
choldgraf 5e755cd
Interactive computing
choldgraf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ version: 2 | |
|
|
||
| sphinx: | ||
| configuration: docs/source/conf.py | ||
| builder: dirhtml | ||
|
|
||
| build: | ||
| os: ubuntu-22.04 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| myst-parser>=0.18 | ||
| pydata-sphinx-theme>=0.11 | ||
| myst-parser<4 | ||
| pydata-sphinx-theme | ||
| sphinx-autobuild | ||
| sphinx-copybutton | ||
| sphinx-design | ||
| sphinxcontrib-autoprogram>=0.1.7 | ||
| sphinxext-opengraph | ||
| sphinxext-rediraffe |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| # Command-line usage and API | ||
|
|
||
| `repo2docker` is called with this command: | ||
|
|
||
| ``` | ||
| jupyter-repo2docker <source-repository> | ||
| ``` | ||
|
|
||
| where `<source-repository>` is a repository in one of [the supported repository providers](#repository-providers). | ||
|
|
||
| For example, the following command will build an image of Peter Norvig's | ||
| [Pytudes] repository: | ||
|
|
||
| ``` | ||
| jupyter-repo2docker https://github.com/norvig/pytudes | ||
| ``` | ||
|
|
||
| Building the image may take a few minutes. | ||
|
|
||
| [Pytudes] uses a [`requirements.txt` file](https://github.com/norvig/pytudes/blob/HEAD/requirements.txt) to specify its Python environment. Because of this, `repo2docker` will use `pip` to install dependencies listed in this `requirements.txt` file, and these will be present in the generated Docker image. To learn more about configuration files in `repo2docker` visit [](#config-files). | ||
|
|
||
| When the image is built, a message will be output to your terminal: | ||
|
|
||
| ``` | ||
| Copy/paste this URL into your browser when you connect for the first time, | ||
| to login with a token: | ||
| http://0.0.0.0:36511/?token=f94f8fabb92e22f5bfab116c382b4707fc2cade56ad1ace0 | ||
| ``` | ||
|
|
||
| Pasting the URL into your browser will open Jupyter Notebook with the | ||
| dependencies and contents of the source repository in the built image. | ||
|
|
||
| ## Debug repo2docker with `--debug` and `--no-build` | ||
|
|
||
| To debug the container image being built, pass the `--debug` parameter: | ||
|
|
||
| > ```bash | ||
| > jupyter-repo2docker --debug https://github.com/norvig/pytudes | ||
| > ``` | ||
|
|
||
| This will print the generated `Dockerfile`, build it, and run it. | ||
|
|
||
| To see the generated `Dockerfile` without actually building it, pass `--no-build` to the commandline. | ||
| This `Dockerfile` output is for **debugging purposes** of `repo2docker` only - it can not be used by Docker directly. | ||
|
|
||
| > ```bash | ||
| > jupyter-repo2docker --no-build --debug https://github.com/norvig/pytudes | ||
| > ``` | ||
|
|
||
| ## Build from a branch, commit or tag | ||
|
|
||
| To build a particular branch and commit, use the argument `--ref` and | ||
| specify the `branch-name` or `commit-hash`. For example: | ||
|
|
||
| ``` | ||
| jupyter-repo2docker --ref 9ced85dd9a84859d0767369e58f33912a214a3cf https://github.com/norvig/pytudes | ||
| ``` | ||
|
|
||
| :::{tip} | ||
| For reproducible builds, we recommend specifying a commit-hash to | ||
| deterministically build a fixed version of a repository. Not specifying a | ||
| commit-hash will result in the latest commit of the repository being built. | ||
| ::: | ||
|
|
||
| ## Set environment variables during builds | ||
|
|
||
| When running repo2docker locally you can use the `-e` or `--env` command-line | ||
| flag for each variable that you want to define. | ||
|
|
||
| For example: | ||
|
|
||
| ```bash | ||
| jupyter-repo2docker -e VAR1=val1 -e VAR2=val2 ... | ||
| ``` | ||
|
|
||
| You can also configure environment variables for all users of a repository using the | ||
| [](#config-start) configuration file. | ||
|
|
||
| (command-line-api)= | ||
|
|
||
| ## Command-line API | ||
|
|
||
| ```{autoprogram} repo2docker.__main__:argparser | ||
| :prog: jupyter-repo2docker | ||
| ``` | ||
|
|
||
| [pytudes]: https://github.com/norvig/pytudes | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.