Skip to content

Commit 8e8cbd0

Browse files
authored
Merge pull request #1097 from mathbunnyru/asalikhov/improve_docs
Improve documentation
2 parents 8cddbac + 40d2312 commit 8e8cbd0

File tree

11 files changed

+82
-82
lines changed

11 files changed

+82
-82
lines changed

docs/contributing/features.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ If there's agreement that the feature belongs in one or more of the core stacks:
2525

2626
1. Implement the feature in a local clone of the `jupyter/docker-stacks` project.
2727
2. Please build the image locally before submitting a pull request. Building the image locally shortens the debugging cycle by taking some load off [Travis CI](http://travis-ci.org/), which graciously provides free build services for open source projects like this one. If you use `make`, call:
28-
```
29-
make build/somestack-notebook
30-
```
28+
```bash
29+
make build/somestack-notebook
30+
```
3131
3. [Submit a pull request](https://github.com/PointCloudLibrary/pcl/wiki/A-step-by-step-guide-on-preparing-and-submitting-a-pull-request) (PR) with your changes.
3232
4. Watch for Travis to report a build success or failure for your PR on GitHub.
3333
5. Discuss changes with the maintainers and address any build issues.

docs/contributing/packages.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Please follow the process below to update a package version:
77
1. Locate the Dockerfile containing the library you wish to update (e.g., [base-notebook/Dockerfile](https://github.com/jupyter/docker-stacks/blob/master/base-notebook/Dockerfile), [scipy-notebook/Dockerfile](https://github.com/jupyter/docker-stacks/blob/master/scipy-notebook/Dockerfile))
88
2. Adjust the version number for the package. We prefer to pin the major and minor version number of packages so as to minimize rebuild side-effects when users submit pull requests (PRs). For example, you'll find the Jupyter Notebook package, `notebook`, installed using conda with `notebook=5.4.*`.
99
3. Please build the image locally before submitting a pull request. Building the image locally shortens the debugging cycle by taking some load off [Travis CI](http://travis-ci.org/), which graciously provides free build services for open source projects like this one. If you use `make`, call:
10-
```
11-
make build/somestack-notebook
12-
```
10+
```bash
11+
make build/somestack-notebook
12+
```
1313
4. [Submit a pull request](https://github.com/PointCloudLibrary/pcl/wiki/A-step-by-step-guide-on-preparing-and-submitting-a-pull-request) (PR) with your changes.
1414
5. Watch for Travis to report a build success or failure for your PR on GitHub.
1515
6. Discuss changes with the maintainers and address any build issues. Version conflicts are the most common problem. You may need to upgrade additional packages to fix build failures.

docs/contributing/stacks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ This approach mirrors how we build and share the core stack images. Feel free to
1313

1414
First, install [cookiecutter](https://github.com/audreyr/cookiecutter) using pip or conda:
1515

16-
```
16+
```bash
1717
pip install cookiecutter # or conda install cookiecutter
1818
```
1919

2020
Run the cookiecutter command pointing to the [jupyter/cookiecutter-docker-stacks](https://github.com/jupyter/cookiecutter-docker-stacks) project on GitHub.
2121

22-
```
22+
```bash
2323
cookiecutter https://github.com/jupyter/cookiecutter-docker-stacks.git
2424
```
2525

docs/contributing/tests.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ Please follow the process below to add new tests:
1313
1. If the test should run against every image built, add your test code to one of the modules in [test/](https://github.com/jupyter/docker-stacks/tree/master/test) or create a new module.
1414
2. If your test should run against a single image, add your test code to one of the modules in `some-notebook/test/` or create a new module.
1515
3. Build one or more images you intend to test and run the tests locally. If you use `make`, call:
16-
```
17-
make build/somestack-notebook
18-
make test/somestack-notebook
19-
```
16+
```bash
17+
make build/somestack-notebook
18+
make test/somestack-notebook
19+
```
2020
4. [Submit a pull request](https://github.com/PointCloudLibrary/pcl/wiki/A-step-by-step-guide-on-preparing-and-submitting-a-pull-request) (PR) with your changes.
2121
5. Watch for Travis to report a build success or failure for your PR on GitHub.
22-
6. Discuss changes with the maintainers and address any issues running the tests on Travis.
22+
6. Discuss changes with the maintainers and address any issues running the tests on Travis.

docs/using/common.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ This page describes the options supported by the startup script as well as how t
88

99
You can pass [Jupyter command line options](https://jupyter.readthedocs.io/en/latest/projects/jupyter-command.html) to the `start-notebook.sh` script when launching the container. For example, to secure the Notebook server with a custom password hashed using `IPython.lib.passwd()` instead of the default token, you can run the following:
1010

11-
```
11+
```bash
1212
docker run -d -p 8888:8888 jupyter/base-notebook start-notebook.sh --NotebookApp.password='sha1:74ba40f8a388:c913541b7ee99d15d5ed31d4226bf7838f83a50e'
1313
```
1414

1515
For example, to set the base URL of the notebook server, you can run the following:
1616

17-
```
17+
```bash
1818
docker run -d -p 8888:8888 jupyter/base-notebook start-notebook.sh --NotebookApp.base_url=/some/path
1919
```
2020

@@ -54,7 +54,7 @@ script for execution details.
5454

5555
You may mount SSL key and certificate files into a container and configure Jupyter Notebook to use them to accept HTTPS connections. For example, to mount a host folder containing a `notebook.key` and `notebook.crt` and use them, you might run the following:
5656

57-
```
57+
```bash
5858
docker run -d -p 8888:8888 \
5959
-v /some/host/folder:/etc/ssl/notebook \
6060
jupyter/base-notebook start-notebook.sh \
@@ -64,7 +64,7 @@ docker run -d -p 8888:8888 \
6464

6565
Alternatively, you may mount a single PEM file containing both the key and certificate. For example:
6666

67-
```
67+
```bash
6868
docker run -d -p 8888:8888 \
6969
-v /some/host/folder/notebook.pem:/etc/ssl/notebook.pem \
7070
jupyter/base-notebook start-notebook.sh \
@@ -85,13 +85,13 @@ For additional information about using SSL, see the following:
8585

8686
The `start-notebook.sh` script actually inherits most of its option handling capability from a more generic `start.sh` script. The `start.sh` script supports all of the features described above, but allows you to specify an arbitrary command to execute. For example, to run the text-based `ipython` console in a container, do the following:
8787

88-
```
88+
```bash
8989
docker run -it --rm jupyter/base-notebook start.sh ipython
9090
```
9191

9292
Or, to run JupyterLab instead of the classic notebook, run the following:
9393

94-
```
94+
```bash
9595
docker run -it --rm -p 8888:8888 jupyter/base-notebook start.sh jupyter lab
9696
```
9797

@@ -107,7 +107,7 @@ The default Python 3.x [Conda environment](http://conda.pydata.org/docs/using/en
107107

108108
The `jovyan` user has full read/write access to the `/opt/conda` directory. You can use either `conda` or `pip` to install new packages without any additional permissions.
109109

110-
```
110+
```bash
111111
# install a package into the default (python 3.x) environment
112112
pip install some-package
113113
conda install some-package

docs/using/recipes.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ orchestrator config.
1717

1818
For example:
1919

20-
```
20+
```bash
2121
docker run -it -e GRANT_SUDO=yes --user root jupyter/minimal-notebook
2222
```
2323

@@ -75,7 +75,7 @@ Python 2.x was removed from all images on August 10th, 2017, starting in tag `cc
7575
add a Python 2.x environment by defining your own Dockerfile inheriting from one of the images like
7676
so:
7777

78-
```
78+
```dockerfile
7979
# Choose your desired base image
8080
FROM jupyter/scipy-notebook:latest
8181

@@ -103,7 +103,7 @@ Ref:
103103
The default version of Python that ships with conda/ubuntu may not be the version you want.
104104
To add a conda environment with a different version and make it accessible to Jupyter, the instructions are very similar to Python 2.x but are slightly simpler (no need to switch to `root`):
105105

106-
```
106+
```dockerfile
107107
# Choose your desired base image
108108
FROM jupyter/minimal-notebook:latest
109109

@@ -168,12 +168,12 @@ ENTRYPOINT ["jupyter", "lab", "--ip=0.0.0.0", "--allow-root"]
168168
```
169169

170170
And build the image as:
171-
```
171+
```bash
172172
docker build -t jupyter/scipy-dasklabextension:latest .
173173
```
174174

175175
Once built, run using the command:
176-
```
176+
```bash
177177
docker run -it --rm -p 8888:8888 -p 8787:8787 jupyter/scipy-dasklabextension:latest
178178
```
179179

@@ -194,7 +194,7 @@ Ref:
194194
[RISE](https://github.com/damianavila/RISE) allows via extension to create live slideshows of your
195195
notebooks, with no conversion, adding javascript Reveal.js:
196196

197-
```
197+
```bash
198198
# Add Live slideshows with RISE
199199
RUN conda install -c damianavila82 rise
200200
```
@@ -207,7 +207,7 @@ Credit: [Paolo D.](https://github.com/pdonorio) based on
207207
You need to install conda's gcc for Python xgboost to work properly. Otherwise, you'll get an
208208
exception about libgomp.so.1 missing GOMP_4.0.
209209

210-
```
210+
```bash
211211
%%bash
212212
conda install -y gcc
213213
pip install xgboost
@@ -320,8 +320,8 @@ Credit: [Justin Tyberg](https://github.com/jtyberg), [quanghoc](https://github.c
320320
To use a specific version of JupyterHub, the version of `jupyterhub` in your image should match the
321321
version in the Hub itself.
322322

323-
```
324-
FROM jupyter/base-notebook:5ded1de07260
323+
```dockerfile
324+
FROM jupyter/base-notebook:5ded1de07260
325325
RUN pip install jupyterhub==0.8.0b1
326326
```
327327

@@ -383,7 +383,7 @@ Ref:
383383

384384
### Using Local Spark JARs
385385

386-
```
386+
```python
387387
import os
388388
os.environ['PYSPARK_SUBMIT_ARGS'] = '--jars /home/jovyan/spark-streaming-kafka-assembly_2.10-1.6.1.jar pyspark-shell'
389389
import pyspark
@@ -412,7 +412,7 @@ Ref:
412412

413413
### Use jupyter/all-spark-notebooks with an existing Spark/YARN cluster
414414

415-
```
415+
```dockerfile
416416
FROM jupyter/all-spark-notebook
417417

418418
# Set env vars for pydoop
@@ -488,21 +488,21 @@ convenient to launch the server without a password or token. In this case, you s
488488

489489
For jupyterlab:
490490

491-
```
491+
```bash
492492
docker run jupyter/base-notebook:6d2a05346196 start.sh jupyter lab --LabApp.token=''
493493
```
494494

495495
For jupyter classic:
496496

497-
```
497+
```bash
498498
docker run jupyter/base-notebook:6d2a05346196 start.sh jupyter notebook --NotebookApp.token=''
499499
```
500500

501501
## Enable nbextension spellchecker for markdown (or any other nbextension)
502502

503503
NB: this works for classic notebooks only
504504

505-
```
505+
```dockerfile
506506
# Update with your base image of choice
507507
FROM jupyter/minimal-notebook:latest
508508

@@ -521,7 +521,7 @@ Ref:
521521

522522
Using `auto-sklearn` requires `swig`, which the other notebook images lack, so it cant be experimented with. Also, there is no Conda package for `auto-sklearn`.
523523

524-
```
524+
```dockerfile
525525
ARG BASE_CONTAINER=jupyter/scipy-notebook
526526
FROM jupyter/scipy-notebook:latest
527527

docs/using/specifics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ Connection to Spark Cluster on **[Standalone Mode](https://spark.apache.org/docs
112112
2. Run the Docker container with `--net=host` in a location that is network addressable by all of
113113
your Spark workers. (This is a [Spark networking
114114
requirement](http://spark.apache.org/docs/latest/cluster-overview.html#components).)
115-
* NOTE: When using `--net=host`, you must also use the flags `--pid=host -e
116-
TINI_SUBREAPER=true`. See https://github.com/jupyter/docker-stacks/issues/64 for details.
115+
* NOTE: When using `--net=host`, you must also use the flags `--pid=host -e
116+
TINI_SUBREAPER=true`. See https://github.com/jupyter/docker-stacks/issues/64 for details.
117117

118118
**Note**: In the following examples we are using the Spark master URL `spark://master:7077` that shall be replaced by the URL of the Spark master.
119119

examples/docker-compose/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ See the [installation instructions](https://docs.docker.com/engine/installation/
1212

1313
Build and run a `jupyter/minimal-notebook` container on a VirtualBox VM on local desktop.
1414

15-
```
15+
```bash
1616
# create a Docker Machine-controlled VirtualBox VM
1717
bin/vbox.sh mymachine
1818

@@ -28,7 +28,7 @@ notebook/up.sh
2828

2929
To stop and remove the container:
3030

31-
```
31+
```bash
3232
notebook/down.sh
3333
```
3434

@@ -39,14 +39,14 @@ notebook/down.sh
3939

4040
You can customize the docker-stack notebook image to deploy by modifying the `notebook/Dockerfile`. For example, you can build and deploy a `jupyter/all-spark-notebook` by modifying the Dockerfile like so:
4141

42-
```
42+
```dockerfile
4343
FROM jupyter/all-spark-notebook:55d5ca6be183
4444
...
4545
```
4646

4747
Once you modify the Dockerfile, don't forget to rebuild the image.
4848

49-
```
49+
```bash
5050
# activate the docker machine
5151
eval "$(docker-machine env mymachine)"
5252

@@ -57,14 +57,14 @@ notebook/build.sh
5757

5858
Yes. Set environment variables to specify unique names and ports when running the `up.sh` command.
5959

60-
```
60+
```bash
6161
NAME=my-notebook PORT=9000 notebook/up.sh
6262
NAME=your-notebook PORT=9001 notebook/up.sh
6363
```
6464

6565
To stop and remove the containers:
6666

67-
```
67+
```bash
6868
NAME=my-notebook notebook/down.sh
6969
NAME=your-notebook notebook/down.sh
7070
```
@@ -78,7 +78,7 @@ The `up.sh` creates a Docker volume named after the notebook container with a `-
7878

7979
Yes. Set the `WORK_VOLUME` environment variable to the same value for each notebook.
8080

81-
```
81+
```bash
8282
NAME=my-notebook PORT=9000 WORK_VOLUME=our-work notebook/up.sh
8383
NAME=your-notebook PORT=9001 WORK_VOLUME=our-work notebook/up.sh
8484
```
@@ -87,7 +87,7 @@ NAME=your-notebook PORT=9001 WORK_VOLUME=our-work notebook/up.sh
8787

8888
To run the notebook server with a self-signed certificate, pass the `--secure` option to the `up.sh` script. You must also provide a password, which will be used to secure the notebook server. You can specify the password by setting the `PASSWORD` environment variable, or by passing it to the `up.sh` script.
8989

90-
```
90+
```bash
9191
PASSWORD=a_secret notebook/up.sh --secure
9292

9393
# or
@@ -103,15 +103,15 @@ This example includes the `bin/letsencrypt.sh` script, which runs the `letsencry
103103

104104
The following command will create a certificate chain and store it in a Docker volume named `mydomain-secrets`.
105105

106-
```
106+
```bash
107107
FQDN=host.mydomain.com EMAIL=myemail@somewhere.com \
108108
SECRETS_VOLUME=mydomain-secrets \
109109
bin/letsencrypt.sh
110110
```
111111

112112
Now run `up.sh` with the `--letsencrypt` option. You must also provide the name of the secrets volume and a password.
113113

114-
```
114+
```bash
115115
PASSWORD=a_secret SECRETS_VOLUME=mydomain-secrets notebook/up.sh --letsencrypt
116116

117117
# or
@@ -120,7 +120,7 @@ notebook/up.sh --letsencrypt --password a_secret --secrets mydomain-secrets
120120

121121
Be aware that Let's Encrypt has a pretty [low rate limit per domain](https://community.letsencrypt.org/t/public-beta-rate-limits/4772/3) at the moment. You can avoid exhausting your limit by testing against the Let's Encrypt staging servers. To hit their staging servers, set the environment variable `CERT_SERVER=--staging`.
122122

123-
```
123+
```bash
124124
FQDN=host.mydomain.com EMAIL=myemail@somewhere.com \
125125
CERT_SERVER=--staging \
126126
bin/letsencrypt.sh
@@ -134,13 +134,13 @@ Yes, you should be able to deploy to any Docker Machine-controlled host. To mak
134134

135135
To create a Docker machine using a VirtualBox VM on local desktop:
136136

137-
```
137+
```bash
138138
bin/vbox.sh mymachine
139139
```
140140

141141
To create a Docker machine using a virtual device on IBM SoftLayer:
142142

143-
```
143+
```bash
144144
export SOFTLAYER_USER=my_softlayer_username
145145
export SOFTLAYER_API_KEY=my_softlayer_api_key
146146
export SOFTLAYER_DOMAIN=my.domain

0 commit comments

Comments
 (0)