mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-07 10:04:03 +00:00
Minor improvements
This commit is contained in:
@@ -150,7 +150,7 @@ repos:
|
||||
hooks:
|
||||
- id: blacken-docs
|
||||
# --skip-errors is added to allow us to have python syntax highlighting even if
|
||||
# the python code blocks includes jupyter specific additions such as % or !
|
||||
# the python code blocks include jupyter-specific additions such as % or !
|
||||
# See https://github.com/adamchainz/blacken-docs/issues/127 for an upstream
|
||||
# feature request about this.
|
||||
args: [--target-version=py39, --skip-errors]
|
||||
|
@@ -5,6 +5,6 @@ for information about how to contribute
|
||||
[features](https://jupyter-docker-stacks.readthedocs.io/en/latest/contributing/features.html),
|
||||
[recipes](https://jupyter-docker-stacks.readthedocs.io/en/latest/contributing/recipes.html),
|
||||
[tests](https://jupyter-docker-stacks.readthedocs.io/en/latest/contributing/tests.html),
|
||||
[community-maintained stacks](https://jupyter-docker-stacks.readthedocs.io/en/latest/contributing/stacks.html).
|
||||
and [community-maintained stacks](https://jupyter-docker-stacks.readthedocs.io/en/latest/contributing/stacks.html).
|
||||
|
||||
<!-- markdownlint-disable-file MD041 -->
|
||||
|
@@ -48,7 +48,7 @@ It contains:
|
||||
[Dockerfile commit history](https://github.com/jupyter/docker-stacks/commits/main/images/base-notebook/Dockerfile) |
|
||||
[Quay.io image tags](https://quay.io/repository/jupyter/base-notebook?tab=tags)
|
||||
|
||||
`jupyter/base-notebook` adds base Jupyter Applications like JupyterLab, Jupyter Notebook, JupyterHub and NBClassic
|
||||
`jupyter/base-notebook` adds base Jupyter Applications like JupyterLab, Jupyter Notebook, JupyterHub, and NBClassic
|
||||
and serves as the basis for all other stacks besides `jupyter/docker-stacks-foundation`.
|
||||
|
||||
It contains:
|
||||
@@ -83,7 +83,7 @@ It contains:
|
||||
[git](https://git-scm.com/),
|
||||
[nano](https://www.nano-editor.org/) (actually `nano-tiny`),
|
||||
[tzdata](https://www.iana.org/time-zones),
|
||||
[unzip](https://code.launchpad.net/ubuntu/+source/unzip)
|
||||
[unzip](https://code.launchpad.net/ubuntu/+source/unzip),
|
||||
and [vi](https://www.vim.org) (actually `vim-tiny`),
|
||||
- [TeX Live](https://www.tug.org/texlive/) for notebook document conversion
|
||||
|
||||
@@ -193,7 +193,7 @@ It contains:
|
||||
[Dockerfile commit history](https://github.com/jupyter/docker-stacks/commits/main/images/datascience-notebook/Dockerfile) |
|
||||
[Quay.io image tags](https://quay.io/repository/jupyter/datascience-notebook?tab=tags)
|
||||
|
||||
`jupyter/datascience-notebook` includes libraries for data analysis from the Python, and R, and Julia communities.
|
||||
`jupyter/datascience-notebook` includes libraries for data analysis from the Python, R, and Julia communities.
|
||||
|
||||
- Everything in the `jupyter/scipy-notebook`, `jupyter/r-notebook`, and `jupyter/julia-notebook` images and their ancestor
|
||||
images
|
||||
@@ -244,7 +244,7 @@ Every Monday and whenever a pull request is merged, images are rebuilt and pushe
|
||||
|
||||
Whenever a docker image is pushed to the container registry, it is tagged with:
|
||||
|
||||
- a `latest` tag
|
||||
- the `latest` tag
|
||||
- a 12-character git commit SHA like `1ffe43816ba9`
|
||||
- a date formatted like `2023-01-30`
|
||||
- OS version like `ubuntu-22.04`
|
||||
|
@@ -76,7 +76,7 @@ RUN echo "auth requisite pam_deny.so" >> /etc/pam.d/su && \
|
||||
|
||||
USER ${NB_UID}
|
||||
|
||||
# Pin Python version here, or set it to "default"
|
||||
# Pin the Python version here, or set it to "default"
|
||||
ARG PYTHON_VERSION=3.11
|
||||
|
||||
# Setup work directory for backward-compatibility
|
||||
|
@@ -4,9 +4,9 @@
|
||||
|
||||
set -e
|
||||
|
||||
# The _log function is used for everything this script wants to log. It will
|
||||
# always log errors and warnings, but can be silenced for other messages
|
||||
# by setting JUPYTER_DOCKER_STACKS_QUIET environment variable.
|
||||
# The _log function is used for everything this script wants to log.
|
||||
# It will always log errors and warnings but can be silenced for other messages
|
||||
# by setting the JUPYTER_DOCKER_STACKS_QUIET environment variable.
|
||||
_log () {
|
||||
if [[ "$*" == "ERROR:"* ]] || [[ "$*" == "WARNING:"* ]] || [[ "${JUPYTER_DOCKER_STACKS_QUIET}" == "" ]]; then
|
||||
echo "$@"
|
||||
@@ -62,7 +62,7 @@ if [ "$(id -u)" == 0 ]; then
|
||||
_log "- home dir: /home/jovyan -> /home/${NB_USER}"
|
||||
fi
|
||||
elif ! id -u "${NB_USER}" &> /dev/null; then
|
||||
_log "ERROR: Neither the jovyan user or '${NB_USER}' exists. This could be the result of stopping and starting, the container with a different NB_USER environment variable."
|
||||
_log "ERROR: Neither the jovyan user nor '${NB_USER}' exists. This could be the result of stopping and starting, the container with a different NB_USER environment variable."
|
||||
exit 1
|
||||
fi
|
||||
# Ensure the desired user (NB_USER) gets its desired user id (NB_UID) and is
|
||||
|
@@ -15,8 +15,8 @@ For example, we dump all the `conda` packages, including their versions.
|
||||
- All the images are located in a hierarchical tree.
|
||||
More info on [image relationships](../docs/using/selecting.md#image-relationships).
|
||||
- We have `tagger` and `manifest` classes, which can be run inside docker containers to obtain tags and build manifest pieces.
|
||||
- These classes are inherited from the parent image to all the children images.
|
||||
- Because manifests and tags might change from parent to children, `taggers` and `manifests` are reevaluated on each image.
|
||||
- These classes are inherited from the parent image to all the child images.
|
||||
- Because manifests and tags might change from parent to child, `taggers` and `manifests` are reevaluated on each image.
|
||||
So, the values are not inherited.
|
||||
- To tag an image and create a manifest, run `make hook/base-notebook` (or another image of your choice).
|
||||
|
||||
|
@@ -42,7 +42,7 @@ if __name__ == "__main__":
|
||||
arg_parser.add_argument(
|
||||
"--short-image-name",
|
||||
required=True,
|
||||
help="Short image name to apply tags for",
|
||||
help="Short image name",
|
||||
)
|
||||
arg_parser.add_argument(
|
||||
"--tags-dir",
|
||||
|
@@ -59,7 +59,7 @@ if __name__ == "__main__":
|
||||
arg_parser.add_argument(
|
||||
"--short-image-name",
|
||||
required=True,
|
||||
help="Short image name to apply tags for",
|
||||
help="Short image name",
|
||||
)
|
||||
arg_parser.add_argument(
|
||||
"--tags-dir",
|
||||
|
@@ -111,7 +111,7 @@ if __name__ == "__main__":
|
||||
arg_parser.add_argument(
|
||||
"--short-image-name",
|
||||
required=True,
|
||||
help="Short image name to create manifests for",
|
||||
help="Short image name",
|
||||
)
|
||||
arg_parser.add_argument(
|
||||
"--hist-lines-dir",
|
||||
|
@@ -50,7 +50,7 @@ if __name__ == "__main__":
|
||||
arg_parser.add_argument(
|
||||
"--short-image-name",
|
||||
required=True,
|
||||
help="Short image name to write tags for",
|
||||
help="Short image name",
|
||||
)
|
||||
arg_parser.add_argument(
|
||||
"--tags-dir",
|
||||
|
@@ -10,11 +10,11 @@ LOGGER = logging.getLogger(__name__)
|
||||
def check_r_mimetypes(container: TrackedContainer) -> None:
|
||||
"""Check if Rscript command can be executed"""
|
||||
LOGGER.info("Test that R command can be executed ...")
|
||||
Rcommand = 'if (length(getOption("jupyter.plot_mimetypes")) != 5) {stop("missing jupyter.plot_mimetypes")}'
|
||||
R_MIMETYPES_CHECK_CMD = 'if (length(getOption("jupyter.plot_mimetypes")) != 5) {stop("missing jupyter.plot_mimetypes")}'
|
||||
logs = container.run_and_wait(
|
||||
timeout=10,
|
||||
tty=True,
|
||||
command=["Rscript", "-e", Rcommand],
|
||||
command=["Rscript", "-e", R_MIMETYPES_CHECK_CMD],
|
||||
)
|
||||
LOGGER.debug(f"{logs=}")
|
||||
assert len(logs) == 0, f"Command {Rcommand=} failed"
|
||||
assert len(logs) == 0, f"Command {R_MIMETYPES_CHECK_CMD=} failed"
|
||||
|
@@ -78,8 +78,8 @@ class TrackedContainer:
|
||||
self.kwargs: Any = kwargs
|
||||
|
||||
def run_detached(self, **kwargs: Any) -> Container:
|
||||
"""Runs a docker container using the preconfigured image name
|
||||
and a mix of the preconfigured container options and those passed
|
||||
"""Runs a docker container using the pre-configured image name
|
||||
and a mix of the pre-configured container options and those passed
|
||||
to this method.
|
||||
|
||||
Keeps track of the docker.Container instance spawned to kill it
|
||||
|
@@ -4,7 +4,7 @@
|
||||
"""
|
||||
test_packages
|
||||
~~~~~~~~~~~~~~~
|
||||
This test module tests if R and Python packages installed can be imported.
|
||||
This test module tests if the R and Python packages installed can be imported.
|
||||
It's a basic test aiming to prove that the package is working properly.
|
||||
|
||||
The goal is to detect import errors that can be caused by incompatibilities between packages, for example:
|
||||
|
@@ -39,7 +39,7 @@ if __name__ == "__main__":
|
||||
arg_parser.add_argument(
|
||||
"--short-image-name",
|
||||
required=True,
|
||||
help="Short image name to run test on",
|
||||
help="Short image name",
|
||||
)
|
||||
arg_parser.add_argument(
|
||||
"--registry",
|
||||
|
Reference in New Issue
Block a user