mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-18 07:22:57 +00:00
Fix grammar
This commit is contained in:
@@ -23,7 +23,7 @@ Roughly speaking, we evaluate new features based on the following criteria:
|
|||||||
with Jupyter Notebook, JupyterLab, JupyterHub, etc.?
|
with Jupyter Notebook, JupyterLab, JupyterHub, etc.?
|
||||||
- **Fit with the image purpose**: Does the feature match the theme of the stack in which it will be
|
- **Fit with the image purpose**: Does the feature match the theme of the stack in which it will be
|
||||||
added? Would it fit better in a new community stack?
|
added? Would it fit better in a new community stack?
|
||||||
- **Complexity of build / runtime configuration**: How many lines of code does the feature require
|
- **Complexity of build/runtime configuration**: How many lines of code does the feature require
|
||||||
in one of the Dockerfiles or startup scripts? Does it require new scripts entirely? Do users need
|
in one of the Dockerfiles or startup scripts? Does it require new scripts entirely? Do users need
|
||||||
to adjust how they use the images?
|
to adjust how they use the images?
|
||||||
- **Impact on image metrics**: How many bytes does the feature and its dependencies add to the
|
- **Impact on image metrics**: How many bytes does the feature and its dependencies add to the
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# Lint
|
# Lint
|
||||||
|
|
||||||
To enforce some rules **linters** are used in this project.
|
To enforce some rules, **linters** are used in this project.
|
||||||
Linters can be run either during the **development phase** (by the developer) or the **integration phase** (by GitHub Actions).
|
Linters can be run either during the **development phase** (by the developer) or the **integration phase** (by GitHub Actions).
|
||||||
To integrate and enforce this process in the project lifecycle, we are using **git hooks** through [pre-commit][pre-commit].
|
To integrate and enforce this process in the project lifecycle, we are using **git hooks** through [pre-commit][pre-commit].
|
||||||
|
|
||||||
|
@@ -12,8 +12,8 @@ We pin major.minor version of python, so this will stay the same even after invo
|
|||||||
## Outdated packages
|
## Outdated packages
|
||||||
|
|
||||||
To help to identify packages that can be updated, you can use the following helper tool.
|
To help to identify packages that can be updated, you can use the following helper tool.
|
||||||
It will list all the packages installed in the `Dockerfile` that can be updated -- dependencies are
|
It will list all the updateable packages installed in the `Dockerfile` --
|
||||||
filtered to focus only on requested packages.
|
dependencies are filtered to focus only on requested packages.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make check-outdated/base-notebook
|
make check-outdated/base-notebook
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# New Recipes
|
# New Recipes
|
||||||
|
|
||||||
We welcome contributions of [recipes](../using/recipes.md), short examples of using, configuring, or extending the Docker Stacks, for inclusion in the documentation site.
|
We welcome contributions of [recipes](../using/recipes.md), short examples of using, configuring, or extending the Docker Stacks for inclusion in the documentation site.
|
||||||
Follow the process below to add a new recipe:
|
Follow the process below to add a new recipe:
|
||||||
|
|
||||||
1. Open the `docs/using/recipes.md` source file.
|
1. Open the `docs/using/recipes.md` source file.
|
||||||
|
@@ -87,17 +87,17 @@ The cookiecutter template comes with a `.github/workflows/docker.yml` file, whic
|
|||||||
This will trigger the CI pipeline whenever you push to your `main` branch and when any Pull Requests are made to your repository.
|
This will trigger the CI pipeline whenever you push to your `main` branch and when any Pull Requests are made to your repository.
|
||||||
For more details on this configuration, visit the [GitHub actions documentation on triggers](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows).
|
For more details on this configuration, visit the [GitHub actions documentation on triggers](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows).
|
||||||
|
|
||||||
2. Commit your changes and push to GitHub.
|
2. Commit your changes and push them to GitHub.
|
||||||
3. Head back to your repository and click on the **Actions** tab.
|
3. Head back to your repository and click on the **Actions** tab.
|
||||||

|

|
||||||
From there, you can click on the workflows on the left-hand side of the screen.
|
From there, you can click on the workflows on the left-hand side of the screen.
|
||||||
4. In the next screen, you will see information about the workflow run and duration.
|
4. In the next screen, you will see information about the workflow run and duration.
|
||||||
If you click again on the button with the workflow name, you will see the logs for the workflow steps.
|
If you click the button with the workflow name again, you will see the logs for the workflow steps.
|
||||||

|

|
||||||
|
|
||||||
## Configuring Docker Hub
|
## Configuring Docker Hub
|
||||||
|
|
||||||
Now, configure Docker Hub to build your stack image and push it to Docker Hub repository whenever
|
Now, configure Docker Hub to build your stack image and push it to the Docker Hub repository whenever
|
||||||
you merge a GitHub pull request to the main branch of your project.
|
you merge a GitHub pull request to the main branch of your project.
|
||||||
|
|
||||||
1. Visit [https://hub.docker.com/](https://hub.docker.com/) and log in.
|
1. Visit [https://hub.docker.com/](https://hub.docker.com/) and log in.
|
||||||
@@ -124,7 +124,7 @@ you merge a GitHub pull request to the main branch of your project.
|
|||||||
```
|
```
|
||||||
|
|
||||||
13. Head back to your GitHub repository and click on the **Settings tab**.
|
13. Head back to your GitHub repository and click on the **Settings tab**.
|
||||||

|

|
||||||
14. Click on the **Secrets** section and then on the **New repository secret** button in the top right corner (see image above).
|
14. Click on the **Secrets** section and then on the **New repository secret** button in the top right corner (see image above).
|
||||||
15. Create a **DOCKERHUB_TOKEN** secret and paste the Personal Access Token from DockerHub in the **value** field.
|
15. Create a **DOCKERHUB_TOKEN** secret and paste the Personal Access Token from DockerHub in the **value** field.
|
||||||

|

|
||||||
@@ -137,12 +137,12 @@ you merge a GitHub pull request to the main branch of your project.
|
|||||||
Make edits to the Dockerfile in your project to add third-party libraries and configure Jupyter
|
Make edits to the Dockerfile in your project to add third-party libraries and configure Jupyter
|
||||||
applications.
|
applications.
|
||||||
Refer to the Dockerfiles for the core stacks (e.g., [jupyter/datascience-notebook](https://github.com/jupyter/docker-stacks/blob/main/datascience-notebook/Dockerfile))
|
Refer to the Dockerfiles for the core stacks (e.g., [jupyter/datascience-notebook](https://github.com/jupyter/docker-stacks/blob/main/datascience-notebook/Dockerfile))
|
||||||
to get a feel for what's possible and best practices.
|
to get a feel for what's possible and the best practices.
|
||||||
|
|
||||||
[Submit pull requests](https://github.com/PointCloudLibrary/pcl/wiki/A-step-by-step-guide-on-preparing-and-submitting-a-pull-request)
|
[Submit pull requests](https://github.com/PointCloudLibrary/pcl/wiki/A-step-by-step-guide-on-preparing-and-submitting-a-pull-request)
|
||||||
to your project repository on GitHub.
|
to your project repository on GitHub.
|
||||||
Ensure your image builds correctly on GitHub actions before merging to main branch.
|
Ensure your image builds correctly on GitHub actions before merging to the main branch.
|
||||||
Refer to Docker Hub to build your main branch that you can `docker pull`.
|
Refer to Docker Hub to build the main branch that you can `docker pull`.
|
||||||
|
|
||||||
## Sharing Your Image
|
## Sharing Your Image
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@ We greatly appreciate pull requests that extend the automated tests that vet the
|
|||||||
A [GitHub Action workflow](https://github.com/jupyter/docker-stacks/blob/main/.github/workflows/docker.yml)
|
A [GitHub Action workflow](https://github.com/jupyter/docker-stacks/blob/main/.github/workflows/docker.yml)
|
||||||
runs tests against pull requests submitted to the `jupyter/docker-stacks` repository.
|
runs tests against pull requests submitted to the `jupyter/docker-stacks` repository.
|
||||||
|
|
||||||
We use `pytest` module to run tests on the image.
|
We use the `pytest` module to run tests on the image.
|
||||||
`conftest.py` and `pytest.ini` in the `tests` folder define the environment in which tests are run.
|
`conftest.py` and `pytest.ini` in the `tests` folder define the environment in which tests are run.
|
||||||
More info on `pytest` can be found [here](https://docs.pytest.org/en/latest/contents.html).
|
More info on `pytest` can be found [here](https://docs.pytest.org/en/latest/contents.html).
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@ You can pass [Jupyter server options](https://jupyter-server.readthedocs.io/en/l
|
|||||||
|
|
||||||
1. For example, to secure the Notebook server with a [custom password](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html#preparing-a-hashed-password)
|
1. For example, to secure the Notebook server with a [custom password](https://jupyter-server.readthedocs.io/en/latest/operators/public-server.html#preparing-a-hashed-password)
|
||||||
hashed using `jupyter_server.auth.security.passwd()` instead of the default token,
|
hashed using `jupyter_server.auth.security.passwd()` instead of the default token,
|
||||||
you can run the following (this hash was generated for `my-password` password):
|
you can run the following (this hash was generated for the `my-password` password):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -it --rm -p 8888:8888 jupyter/base-notebook \
|
docker run -it --rm -p 8888:8888 jupyter/base-notebook \
|
||||||
|
@@ -193,8 +193,8 @@ Sometimes it is helpful to run the Jupyter instance behind an nginx proxy, for e
|
|||||||
|
|
||||||
- you would prefer to access the notebook at a server URL with a path
|
- you would prefer to access the notebook at a server URL with a path
|
||||||
(`https://example.com/jupyter`) rather than a port (`https://example.com:8888`)
|
(`https://example.com/jupyter`) rather than a port (`https://example.com:8888`)
|
||||||
- you may have many services in addition to Jupyter running on the same server, and want
|
- you may have many services in addition to Jupyter running on the same server
|
||||||
nginx to help improve server performance in managing the connections
|
and want nginx to help improve server performance in managing the connections
|
||||||
|
|
||||||
Here is a [quick example of NGINX configuration](https://gist.github.com/cboettig/8643341bd3c93b62b5c2) to get started.
|
Here is a [quick example of NGINX configuration](https://gist.github.com/cboettig/8643341bd3c93b62b5c2) to get started.
|
||||||
You'll need a server, a `.crt` and `.key` file for your server, and `docker` & `docker-compose` installed.
|
You'll need a server, a `.crt` and `.key` file for your server, and `docker` & `docker-compose` installed.
|
||||||
@@ -418,7 +418,7 @@ RUN echo 'deb https://cdn-fastly.deb.debian.org/debian jessie-backports main' >
|
|||||||
# Alternatively, this could be mounted as a volume
|
# Alternatively, this could be mounted as a volume
|
||||||
rm -f /usr/local/hadoop-2.7.3/etc/hadoop/*
|
rm -f /usr/local/hadoop-2.7.3/etc/hadoop/*
|
||||||
|
|
||||||
# Download this from ambari / cloudera manager and copy here
|
# Download this from ambari/cloudera manager and copy it here
|
||||||
COPY example-hadoop-conf/ /usr/local/hadoop-2.7.3/etc/hadoop/
|
COPY example-hadoop-conf/ /usr/local/hadoop-2.7.3/etc/hadoop/
|
||||||
|
|
||||||
# Spark-Submit doesn't work unless I set the following
|
# Spark-Submit doesn't work unless I set the following
|
||||||
@@ -558,7 +558,7 @@ RUN PYV=$(ls "${CONDA_DIR}/lib" | grep ^python) && \
|
|||||||
It is not required on Windows and won't work on macOS.
|
It is not required on Windows and won't work on macOS.
|
||||||
```
|
```
|
||||||
|
|
||||||
To enable `pandas.read_clipboard()` functionality, you need to have `xclip` installed
|
To enable the `pandas.read_clipboard()` functionality, you need to have `xclip` installed
|
||||||
(installed in `minimal-notebook` and all the inherited images)
|
(installed in `minimal-notebook` and all the inherited images)
|
||||||
and add these options when running `docker`: `-e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix`, i.e.:
|
and add these options when running `docker`: `-e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix`, i.e.:
|
||||||
|
|
||||||
|
@@ -164,7 +164,7 @@ Connection to Spark Cluster on **[Standalone Mode](https://spark.apache.org/docs
|
|||||||
When using `--net=host`, you must also use the flags `--pid=host -e TINI_SUBREAPER=true`. See <https://github.com/jupyter/docker-stacks/issues/64> for details._
|
When using `--net=host`, you must also use the flags `--pid=host -e TINI_SUBREAPER=true`. See <https://github.com/jupyter/docker-stacks/issues/64> for details._
|
||||||
```
|
```
|
||||||
|
|
||||||
**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.
|
**Note**: In the following examples, we are using the Spark master URL `spark://master:7077` which shall be replaced by the URL of the Spark master.
|
||||||
|
|
||||||
##### Standalone Mode in Python
|
##### Standalone Mode in Python
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ spark = (
|
|||||||
```
|
```
|
||||||
|
|
||||||
Dependencies can also be defined in the `spark-defaults.conf`.
|
Dependencies can also be defined in the `spark-defaults.conf`.
|
||||||
However, it has to be done by `root` so it should only be considered to build custom images.
|
However, it has to be done by `root`, so it should only be considered to build custom images.
|
||||||
|
|
||||||
```dockerfile
|
```dockerfile
|
||||||
USER root
|
USER root
|
||||||
|
@@ -57,7 +57,7 @@ The following sections cover a few of these scenarios and how to fix them.
|
|||||||
- `CHOWN_EXTRA_OPTS="-R"`: will recursively change the ownership and group of the directory specified in `CHOWN_EXTRA`.
|
- `CHOWN_EXTRA_OPTS="-R"`: will recursively change the ownership and group of the directory specified in `CHOWN_EXTRA`.
|
||||||
- `--user root`: you **must** run the container with the root user to change ownership at runtime.
|
- `--user root`: you **must** run the container with the root user to change ownership at runtime.
|
||||||
|
|
||||||
now accessing the mount should work as expected:
|
Now accessing the mount should work as expected:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# assuming we mounted the volume in /home/jovyan/stagingarea
|
# assuming we mounted the volume in /home/jovyan/stagingarea
|
||||||
@@ -130,7 +130,8 @@ If you have also **created a new user**, you might be experiencing any of the fo
|
|||||||
|
|
||||||
1. **Ensure the new user has ownership of `/home` and volume mounts**
|
1. **Ensure the new user has ownership of `/home` and volume mounts**
|
||||||
|
|
||||||
For example, say you want to create a user `callisto` with a `GID` and `UID` of `1234`, you will have to add the following flags to the docker run command:
|
For example, say you want to create a user `callisto` with a `GID` and `UID` of `1234`.
|
||||||
|
You will have to add the following flags to the docker run command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -it --rm \
|
docker run -it --rm \
|
||||||
@@ -323,6 +324,6 @@ If you are a regular user of VSCode and the Jupyter extension, you might experie
|
|||||||
When the terminal provides the link to access Jupyter: <http://127.0.0.1:8888/lab?token=80d45d241a1ba4c2...>,
|
When the terminal provides the link to access Jupyter: <http://127.0.0.1:8888/lab?token=80d45d241a1ba4c2...>,
|
||||||
change the default port value of `8888` in the url to the port value mapped with the `docker run` command.
|
change the default port value of `8888` in the url to the port value mapped with the `docker run` command.
|
||||||
|
|
||||||
In this example we use 8001, so the edited link would be: <http://127.0.0.1:8001/lab?token=80d45d241a1ba4c2...>.
|
In this example, we use 8001, so the edited link would be: <http://127.0.0.1:8001/lab?token=80d45d241a1ba4c2...>.
|
||||||
|
|
||||||
Note: Port mapping for Jupyter has other applications outside of Docker. For example, it can be used to allow multiple Jupyter instances when using SSH to control cloud devices.
|
Note: Port mapping for Jupyter has other applications outside of Docker. For example, it can be used to allow multiple Jupyter instances when using SSH to control cloud devices.
|
||||||
|
Reference in New Issue
Block a user