Skip to content

Commit

Permalink
Fix more grammar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbunnyru committed Nov 19, 2023
1 parent d032293 commit d8c60bc
Show file tree
Hide file tree
Showing 38 changed files with 85 additions and 88 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
max-line-length = 88
select = C,E,F,W,B,B950
select = C, E, F, W, B, B950
extend-ignore = E203, E501, W503
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ body:
Example:
- Altair is a declarative statistical visualization library for Python, based on Vega and Vega-Lite, and the source is available on GitHub.
- With Altair, you can spend more time understanding your data and its meaning.
- Altair's API is simple, friendly and consistent and built on top of the powerful Vega-Lite visualization grammar.
- Altair's API is simple, friendly, and consistent and built on top of the powerful Vega-Lite visualization grammar.
- This elegant simplicity produces beautiful and effective visualizations with a minimal amount of code.
validations:
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-tag-push.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Download a Docker image and its tags from GitHub artifacts, apply them and push the image to the Registry
name: Download a Docker image and its tags from GitHub artifacts, apply them, and push the image to the Registry

env:
REGISTRY: quay.io
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ push-all: $(foreach I, $(ALL_IMAGES), push/$(I)) ## push all tagged images

run-shell/%: ## run a bash in interactive mode in a stack
docker run -it --rm "$(REGISTRY)/$(OWNER)/$(notdir $@)" $(SHELL)
run-sudo-shell/%: ## run a bash in interactive mode as root in a stack
run-sudo-shell/%: ## run bash in interactive mode as root in a stack
docker run -it --rm --user root "$(REGISTRY)/$(OWNER)/$(notdir $@)" $(SHELL)


Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ You can use a stack image to do any of the following (and more):
You can try a [relatively recent build of the quay.io/jupyter/base-notebook image on mybinder.org](https://mybinder.org/v2/gh/jupyter/docker-stacks/main?urlpath=lab/tree/README.ipynb)
by simply clicking the preceding link.
Otherwise, the examples below may help you get started if you [have Docker installed](https://docs.docker.com/get-docker/),
know [which Docker image](https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html) you want to use
and want to launch a single Jupyter Application in a container.
know [which Docker image](https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html) you want to use, and want to launch a single Jupyter Application in a container.

The [User Guide on ReadTheDocs](https://jupyter-docker-stacks.readthedocs.io/en/latest/) describes additional uses and features in detail.

Expand All @@ -44,8 +43,8 @@ You can modify the port on which the container's port is exposed by [changing th
Visiting `http://<hostname>:10000/?token=<token>` in a browser loads JupyterLab,
where:

- `hostname` is the name of the computer running Docker
- `token` is the secret token printed in the console.
- The `hostname` is the name of the computer running Docker
- The `token` is the secret token printed in the console.

The container remains intact for restart after the Server exits.

Expand Down Expand Up @@ -127,6 +126,6 @@ for information about how to contribute recipes, features, tests, and community-
- [jupyter/repo2docker](https://github.com/jupyterhub/repo2docker) -
Turn git repositories into Jupyter-enabled Docker Images
- [openshift/source-to-image](https://github.com/openshift/source-to-image) -
A tool for building artifacts from source and injecting them into docker images
A tool for building artifacts from source code and injecting them into docker images
- [jupyter-on-openshift/jupyter-notebooks](https://github.com/jupyter-on-openshift/jupyter-notebooks) -
OpenShift compatible S2I builder for basic notebook images
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
html_theme = "alabaster"
html_static_path = ["_static"]

# File above was generated using sphinx 6.2.1 with this command:
# The file above was generated using sphinx 6.2.1 with this command:
# sphinx-quickstart --project "docker-stacks" --author "Project Jupyter" -v "latest" -r "latest" -l en --no-sep --no-makefile --no-batchfile
# These are custom options for this project

Expand Down
4 changes: 2 additions & 2 deletions docs/contributing/stacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ you merge a GitHub pull request to the main branch of your project.
2. Create a new repository - make sure to use the correct namespace (account or organization).
Enter the name of the image matching the one you entered when prompted with `stack_name` by the cookiecutter.

![Docker Hub - Create Repository page with the name field set to "My specialized jupyter stack"](../_static/contributing/stacks/docker-repo-name.png)
![Docker Hub - 'Create repository' page with the name field set to "My specialized jupyter stack"](../_static/contributing/stacks/docker-repo-name.png)

3. Enter a description for your image.
4. Click on your avatar in the top-right corner and select Account Settings.

![Docker Hub page zoomed into the user's settings and accounts menu](../_static/contributing/stacks/docker-user-dropdown.png)
![The Docker Hub page zoomed into the user's settings and accounts menu](../_static/contributing/stacks/docker-user-dropdown.png)

5. Click on **Security** and then click on the **New Access Token** button.

Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defined in the [conftest.py](https://github.com/jupyter/docker-stacks/blob/main/

## Unit tests

You can add a unit test if you want to run a python script in one of our images.
You can add a unit test if you want to run a Python script in one of our images.
You should create a `tests/<somestack>/units/` directory, if it doesn't already exist, and put your file there.
Files in this folder will be executed in the container when tests are run.
You can see an [example for the TensorFlow package here](https://github.com/jupyter/docker-stacks/blob/HEAD/tests/tensorflow-notebook/units/unit_tensorflow.py).
Expand Down
8 changes: 4 additions & 4 deletions docs/maintaining/new-images-and-packages-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ Here is a non-exhaustive list of things we do care about:
- Does the package open additional ports, or add new web endpoints, that could be exploited?

With all this in mind, we have a voting group, that consists of
[mathbunnyru](https://github.com/mathbunnyru),
[consideRatio](https://github.com/consideRatio),
[yuvipanda](https://github.com/yuvipanda) and
[manics](https://github.com/manics).
[@mathbunnyru](https://github.com/mathbunnyru),
[@consideRatio](https://github.com/consideRatio),
[@yuvipanda](https://github.com/yuvipanda), and
[@manics](https://github.com/manics).

This voting group is responsible for accepting or declining new packages and stacks.
The change is accepted, if there are **at least 2 positive votes**.
2 changes: 1 addition & 1 deletion docs/maintaining/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ We are waiting for the first point release of the new LTS Ubuntu before updating
Other images are directly or indirectly inherited from `docker-stacks-foundation`.
We rebuild our images automatically each week, which means they frequently receive updates.

When there's a security fix in the Ubuntu base image, it's a good idea to manually trigger images rebuild
When there's a security fix in the Ubuntu base image, it's a good idea to manually trigger the rebuild of images
[from the GitHub actions workflow UI](https://github.com/jupyter/docker-stacks/actions/workflows/docker.yml).
Pushing the `Run Workflow` button will trigger this process.

Expand Down
2 changes: 1 addition & 1 deletion docs/using/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ This script is handy when you derive a new Dockerfile from this image and instal
### Others

You can bypass the provided scripts and specify an arbitrary start command.
If you do, keep in mind that features supported by the `start.sh` script and its kin will not function (e.g., `GRANT_SUDO`).
If you do, keep in mind that features, supported by the `start.sh` script and its kin, will not function (e.g., `GRANT_SUDO`).

## Conda Environments

Expand Down
4 changes: 2 additions & 2 deletions docs/using/recipe_code/custom_environment.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM quay.io/jupyter/base-notebook

# Name your environment and choose the python version
# Name your environment and choose the Python version
ARG env_name=python310
ARG py_ver=3.10

Expand Down Expand Up @@ -40,5 +40,5 @@ RUN activate_custom_env_script=/usr/local/bin/before-notebook.d/activate_custom_
USER ${NB_UID}

# Making this environment default in Terminal
# You can comment this line to keep the default environment in Terminal
# You can comment this line to keep the default environment in a Terminal
RUN echo "conda activate ${env_name}" >> "${HOME}/.bashrc"
4 changes: 2 additions & 2 deletions docs/using/recipe_code/oracledb.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ARG INSTANTCLIENT_MAJOR_VERSION=21
ARG INSTANTCLIENT_VERSION=${INSTANTCLIENT_MAJOR_VERSION}.11.0.0.0-1
ARG INSTANTCLIENT_URL=https://download.oracle.com/otn_software/linux/instantclient/2111000

# Then install Oracle SQL Instant client, SQL+Plus, tools and JDBC.
# Then install Oracle SQL Instant client, SQL+Plus, tools, and JDBC.
# Note: You may need to change the URL to a newer version.
# See: https://www.oracle.com/es/database/technologies/instant-client/linux-x86-64-downloads.html
RUN mkdir "/opt/oracle"
Expand All @@ -39,7 +39,7 @@ RUN echo "ORACLE_HOME=/usr/lib/oracle/${INSTANTCLIENT_MAJOR_VERSION}/client64" >
echo "export PATH" >> "${HOME}/.bashrc" && \
echo "export LD_LIBRARY_PATH" >> "${HOME}/.bashrc"

# Add credentials for /redacted/ using Oracle Db.
# Add credentials for /redacted/ using Oracle DB.
WORKDIR /usr/lib/oracle/${INSTANTCLIENT_MAJOR_VERSION}/client64/lib/network/admin/
# Add a wildcard `[]` on the last letter of the filename to avoid throwing an error if the file does not exist.
# See: https://stackoverflow.com/questions/31528384/conditional-copy-add-in-dockerfile
Expand Down
8 changes: 4 additions & 4 deletions docs/using/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Sometimes it is helpful to run the Jupyter instance behind an nginx proxy, for e
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.
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 a `.key` file for your server, and `docker` & `docker-compose` installed.
Then download the files at that gist and run `docker-compose up` to test it out.
Customize the `nginx.conf` file to set the desired paths and add other services.

Expand Down Expand Up @@ -506,9 +506,9 @@ The following recipe demonstrates how to add functionality to read from and writ

You can now use `pyodbc` and `sqlalchemy` to interact with the database.

Pre-built images are hosted in the [realiserad/jupyter-docker-mssql](https://github.com/Realiserad/jupyter-docker-mssql) repository.
Pre-built images are hosted in the [Realiserad/jupyter-docker-mssql](https://github.com/Realiserad/jupyter-docker-mssql) repository.

## Add Oracle SQL Instant client, SQL\*Plus and other tools (Version 21.x)
## Add Oracle SQL Instant client, SQL\*Plus, and other tools (Version 21.x)

```{note}
This recipe only works for x86_64 architecture.
Expand All @@ -520,7 +520,7 @@ This recipe installs version `21.11.0.0.0`.

Nonetheless, go to the [Oracle Instant Client Download page](https://www.oracle.com/es/database/technologies/instant-client/linux-x86-64-downloads.html) for the complete list of versions available.
You may need to perform different steps for older versions;
the may be explained on the "Installation instructions" section of the Downloads page.
they may be explained in the "Installation instructions" section of the Downloads page.

```{literalinclude} recipe_code/oracledb.dockerfile
:language: docker
Expand Down
4 changes: 2 additions & 2 deletions docs/using/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ Any other changes made in the container will be lost.

## Using Binder

[Binder](https://mybinder.org/) is a service that allows you to create and share custom computing environments for projects in version control.
A [Binder](https://mybinder.org/) is a service that allows you to create and share custom computing environments for projects in version control.
You can use any of the Jupyter Docker Stacks images as a basis for a Binder-compatible Dockerfile.
See the
[docker-stacks example](https://mybinder.readthedocs.io/en/latest/examples/sample_repos.html#using-a-docker-image-from-the-jupyter-docker-stacks-repository) and
[Using a Dockerfile](https://mybinder.readthedocs.io/en/latest/tutorials/dockerfile.html) sections in the
[Using a Dockerfile](https://mybinder.readthedocs.io/en/latest/tutorials/dockerfile.html) section in the
[Binder documentation](https://mybinder.readthedocs.io/en/latest/index.html) for instructions.

## Using JupyterHub
Expand Down
8 changes: 4 additions & 4 deletions docs/using/specifics.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This page provides details about features specific to one or more images.
Every new spark context that is created is put onto an incrementing port (i.e. 4040, 4041, 4042, etc.), and it might be necessary to open multiple ports.
```

For example: `docker run --detach -p 8888:8888 -p 4040:4040 -p 4041:4041 quay.io/jupyter/pyspark-notebook`.
For example, `docker run --detach -p 8888:8888 -p 4040:4040 -p 4041:4041 quay.io/jupyter/pyspark-notebook`.

#### IPython low-level output capture and forward

Expand Down Expand Up @@ -53,7 +53,7 @@ You can build a `pyspark-notebook` image with a different `Spark` version by ove
- This version needs to match the version supported by the Spark distribution used above.
- See [Spark Overview](https://spark.apache.org/docs/latest/#downloading) and [Ubuntu packages](https://packages.ubuntu.com/search?keywords=openjdk).

- Starting with _Spark >= 3.2_, the distribution file might contain Scala version.
- Starting with _Spark >= 3.2_, the distribution file might contain the Scala version.

For example, here is how to build a `pyspark-notebook` image with Spark `3.2.0`, Hadoop `3.2`, and OpenJDK `11`.

Expand Down Expand Up @@ -161,7 +161,7 @@ Connection to Spark Cluster on **[Standalone Mode](https://spark.apache.org/docs
0. Verify that the docker image (check the Dockerfile) and the Spark Cluster, which is being
deployed, run the same version of Spark.
1. [Deploy Spark in Standalone Mode](https://spark.apache.org/docs/latest/spark-standalone.html).
2. Run the Docker container with `--net=host` in a location that is network addressable by all of
2. Run the Docker container with `--net=host` in a location that is network-addressable by all of
your Spark workers.
(This is a [Spark networking requirement](https://spark.apache.org/docs/latest/cluster-overview.html#components).)

Expand All @@ -174,7 +174,7 @@ Connection to Spark Cluster on **[Standalone Mode](https://spark.apache.org/docs
##### Standalone Mode in Python

The **same Python version** needs to be used on the notebook (where the driver is located) and on the Spark workers.
The python version used at the driver and worker side can be adjusted by setting the environment variables `PYSPARK_PYTHON` and/or `PYSPARK_DRIVER_PYTHON`,
The Python version used on the driver and worker side can be adjusted by setting the environment variables `PYSPARK_PYTHON` and/or `PYSPARK_DRIVER_PYTHON`,
see [Spark Configuration][spark-conf] for more information.

```python
Expand Down
8 changes: 4 additions & 4 deletions images/base-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]

USER root

# Install all OS dependencies for Server that starts but lacks all
# Install all OS dependencies for the Server that starts but lacks all
# features (e.g., download as all possible file formats)
RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends \
fonts-liberation \
# - pandoc is used to convert notebooks to html files
# it's not present in aarch64 ubuntu image, so we install it here
# it's not present in the aarch64 Ubuntu image, so we install it here
pandoc \
# - run-one - a wrapper script that runs no more
# than one unique instance of some command with a unique set of arguments,
# we use `run-one-constantly` to support `RESTARTABLE` option
# we use `run-one-constantly` to support the `RESTARTABLE` option
run-one && \
apt-get clean && rm -rf /var/lib/apt/lists/*

Expand Down Expand Up @@ -64,7 +64,7 @@ USER root
RUN fix-permissions /etc/jupyter/

# HEALTHCHECK documentation: https://docs.docker.com/engine/reference/builder/#healthcheck
# This healtcheck works well for `lab`, `notebook`, `nbclassic`, `server` and `retro` jupyter commands
# This healtcheck works well for `lab`, `notebook`, `nbclassic`, `server`, and `retro` jupyter commands
# https://github.com/jupyter/docker-stacks/issues/915#issuecomment-1068528799
HEALTHCHECK --interval=5s --timeout=3s --start-period=5s --retries=3 \
CMD /etc/jupyter/docker_healthcheck.py || exit 1
Expand Down
2 changes: 1 addition & 1 deletion images/base-notebook/docker_healthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import requests

# A number of operations below deliberately don't check for possible errors
# Several operations below deliberately don't check for possible errors
# As this is a healthcheck, it should succeed or raise an exception on error

runtime_dir = Path("/home/") / os.environ["NB_USER"] / ".local/share/jupyter/runtime/"
Expand Down
2 changes: 1 addition & 1 deletion images/base-notebook/jupyter_server_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
if not cnf_file.exists():
cnf_file.write_text(OPENSSL_CONFIG)

# Generate a certificate if one doesn't exist on disk
# Generate a certificate if one doesn't exist on a disk
subprocess.check_call(
[
"openssl",
Expand Down
2 changes: 1 addition & 1 deletion images/base-notebook/start-notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
if "NOTEBOOK_ARGS" in os.environ:
command += shlex.split(os.environ["NOTEBOOK_ARGS"])

# Pass through any other args we were passed on the commandline
# Pass through any other args we were passed on the command line
command += sys.argv[1:]

# Execute the command!
Expand Down
12 changes: 6 additions & 6 deletions images/docker-stacks-foundation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]

USER root

# Install all OS dependencies for Server that starts
# Install all OS dependencies for the Server that starts
# but lacks all features (e.g., download as all possible file formats)
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update --yes && \
# - apt-get upgrade is run to patch known vulnerabilities in apt-get packages as
# the ubuntu base image is rebuilt too seldom sometimes (less than once a month)
# - `apt-get upgrade` is run to patch known vulnerabilities in apt-get packages as
# the Ubuntu base image is rebuilt too seldom sometimes (less than once a month)
apt-get upgrade --yes && \
apt-get install --yes --no-install-recommends \
# - bzip2 is necessary to extract the micromamba executable.
Expand Down Expand Up @@ -76,19 +76,19 @@ RUN echo "auth requisite pam_deny.so" >> /etc/pam.d/su && \

USER ${NB_UID}

# Pin python version here, or set it to "default"
# Pin Python version here, or set it to "default"
ARG PYTHON_VERSION=3.11

# Setup work directory for backward-compatibility
RUN mkdir "/home/${NB_USER}/work" && \
fix-permissions "/home/${NB_USER}"

# Download and install Micromamba, and initialize Conda prefix.
# Download and install Micromamba, and initialize the Conda prefix.
# <https://github.com/mamba-org/mamba#micromamba>
# Similar projects using Micromamba:
# - Micromamba-Docker: <https://github.com/mamba-org/micromamba-docker>
# - repo2docker: <https://github.com/jupyterhub/repo2docker>
# Install Python, Mamba and jupyter_core
# Install Python, Mamba, and jupyter_core
# Cleanup temporary files and remove Micromamba
# Correct permissions
# Do all this in a single RUN command to avoid duplicating all of the
Expand Down
14 changes: 6 additions & 8 deletions images/docker-stacks-foundation/fix-permissions
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
#!/bin/bash
# set permissions on a directory
# after any installation, if a directory needs to be (human) user-writable,
# run this script on it.
# It will make everything in the directory owned by the group ${NB_GID}
# and writable by that group.
# Set permissions on a directory
# After any installation, if a directory needs to be (human) user-writable, run this script on it.
# It will make everything in the directory owned by the group ${NB_GID} and writable by that group.
# Deployments that want to set a specific user id can preserve permissions
# by adding the `--group-add users` line to `docker run`.

# uses find to avoid touching files that already have the right permissions,
# which would cause massive image explosion
# Uses find to avoid touching files that already have the right permissions,
# which would cause a massive image explosion

# right permissions are:
# Right permissions are:
# group=${NB_GID}
# AND permissions include group rwX (directory-execute)
# AND directories have setuid,setgid bits set
Expand Down
Loading

0 comments on commit d8c60bc

Please sign in to comment.