forked from jupyter/docker-stacks
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
98 changed files
with
11,981 additions
and
224 deletions.
There are no files selected for viewing
This file contains 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,2 @@ | ||
* text=auto eol=lf | ||
|
This file contains 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 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 |
---|---|---|
|
@@ -66,3 +66,5 @@ dockerspawner | |
dockerspawner.tar.gz | ||
*.orig | ||
.ipynb_checkpoints/ | ||
.vscode/ | ||
.pytest_cache/ |
This file contains 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,16 @@ | ||
# .readthedocs.yml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
formats: all | ||
|
||
python: | ||
version: 3.7 | ||
install: | ||
- requirements: requirements-dev.txt |
This file contains 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,11 +1,44 @@ | ||
dist: xenial | ||
language: python | ||
python: | ||
- 3.6 | ||
- 3.7 | ||
sudo: required | ||
services: | ||
- docker | ||
install: | ||
- make dev-env | ||
script: | ||
- make test/docs docs | ||
- make build-test-all DARGS="--build-arg TEST_ONLY_BUILD=1" | ||
|
||
jobs: | ||
include: | ||
- stage: diff-test | ||
install: | ||
- pip install --upgrade pip | ||
- make dev-env | ||
script: | ||
- set -e | ||
- if [ $(make n-docs-diff) -ne 0 ]; then make docs; fi; | ||
- if [ $(make n-other-diff) -ne 0 ]; then make build-test-all DARGS="--build-arg TEST_ONLY_BUILD=1"; fi; | ||
- stage: push-tx | ||
install: | ||
- pip install --upgrade pip | ||
- make dev-env | ||
script: | ||
- if [ $(make n-docs-diff DIFF_RANGE=$TRAVIS_COMMIT_RANGE) -ne 0 ]; then make tx-en; fi; | ||
- stage: full-test | ||
install: | ||
- pip install --upgrade pip | ||
- make dev-env | ||
script: | ||
- set -e | ||
- make docs | ||
- make build-test-all DARGS="--build-arg TEST_ONLY_BUILD=1" | ||
|
||
stages: | ||
- name: diff-test | ||
if: type = pull_request | ||
- name: push-tx | ||
if: type = push AND branch = master | ||
- name: full-test | ||
if: type = cron AND branch = master | ||
|
||
env: | ||
global: | ||
secure: JDQKgB1laaenzmEGI9gduwK/iS0030qsl62njJg3jib0R8wxBi2OeetEdoGl9m4NFsqqnp0OO7nm4rzGfuwjL1A38flSlXOTxhjm/hvo3vmnqVu5lDcdk9+IRkafnfd3Dyd86tLxRVETOqZwCLmdNkB2fmQII8du5IIqbJuUGp8DrG7kVMf3NBr9rjkZRfByQrgG4s1NXuT61VvpWMPJAOhcrImuHBheVJDEV0U3n6Xavd7Wo+pAHrHU8exvYTZ1IzZMbHc6K0iC/NpCHcH9+9DAeLDk/q1aDNqbTExnQevOHZzNqgHC2qFOlN4jfy/TLYLpLXtUismneBBqVSK3iZso3Vqy2BRXWgouI+Tt+08ffocy9XPwEzSwkgPgDlFVUikPOy5imwjpDb13RMIyMY4CKlSOdQx2rH2kPkZ0MJJPcki3KGuGl3qRvqyblMn+lZvjAu6WVLZfo7EtcxsQ0ZZxbAbGoUVl27FHg+UvIfC0I3wEcZIp7oED47Q8s0MdCijD3AwkRPvx/iyp3J0A42su7kkOooFcmUItEIqegQJ4Aki1FBv2i5vHmBobClktytZceLsKvzCeLjMpL9HcUVfUaJDKRwtUYIozpYeBnac+E6J1s6glcqLrXIHWez8N6SzokBa6SPqdtODdzzk5OJupByub6CYWsRXvxIQ7/wI= |
This file contains 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,6 +1,10 @@ | ||
Thanks for for contributing! Please see the [Contributor Guide](https://jupyter-docker-stacks.readthedocs.io) in the | ||
documentation for information about how to contribute [package updates](http://jupyter-docker-stacks.readthedocs.io/en/latest/contributing/packages.html), | ||
Thanks for contributing! Please see the | ||
[Contributor Guide](https://jupyter-docker-stacks.readthedocs.io) in the documentation for | ||
information about how to contribute | ||
[package updates](http://jupyter-docker-stacks.readthedocs.io/en/latest/contributing/packages.html), | ||
[recipes](http://jupyter-docker-stacks.readthedocs.io/en/latest/contributing/recipes.html), | ||
[tests](http://jupyter-docker-stacks.readthedocs.io/en/latest/contributing/tests.html), | ||
[features](http://jupyter-docker-stacks.readthedocs.io/en/latest/contributing/features.html), | ||
and [community-maintained stacks](http://jupyter-docker-stacks.readthedocs.io/en/latest/contributing/stacks.html). | ||
[translations](https://jupyter-docker-stacks.readthedocs.io/en/latest/contributing/translations.html), | ||
and | ||
[community-maintained stacks](http://jupyter-docker-stacks.readthedocs.io/en/latest/contributing/stacks.html). |
This file contains 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 @@ | |
SHELL:=bash | ||
OWNER:=jupyter | ||
ARCH:=$(shell uname -m) | ||
DIFF_RANGE?=master...HEAD | ||
|
||
# Need to list the images in build dependency order | ||
ifeq ($(ARCH),ppc64le) | ||
|
@@ -60,8 +61,27 @@ dev-env: ## install libraries required to build docs and run tests | |
docs: ## build HTML documentation | ||
make -C docs html | ||
|
||
test/docs: ## check links in Sphinx documentation | ||
make -C docs linkcheck | ||
n-docs-diff: ## number of docs/ files changed since branch from master | ||
@git diff --name-only $(DIFF_RANGE) -- docs/ ':!docs/locale' | wc -l | awk '{print $$1}' | ||
|
||
|
||
n-other-diff: ## number of files outside docs/ changed since branch from master | ||
@git diff --name-only $(DIFF_RANGE) -- ':!docs/' | wc -l | awk '{print $$1}' | ||
|
||
tx-en: ## rebuild en locale strings and push to master (req: GH_TOKEN) | ||
@git config --global user.email "[email protected]" | ||
@git config --global user.name "Travis CI" | ||
@git checkout master | ||
|
||
@make -C docs clean gettext | ||
@cd docs && sphinx-intl update -p _build/gettext -l en | ||
|
||
@git add docs/locale/en | ||
@git commit -m "[ci skip] Update en source strings (build: $$TRAVIS_JOB_NUMBER)" | ||
|
||
@git remote add origin-tx https://$${GH_TOKEN}@github.com/jupyter/docker-stacks.git | ||
@git push -u origin-tx master | ||
|
||
|
||
test/%: ## run tests against a stack | ||
@TEST_IMAGE="$(OWNER)/$(notdir $@)" pytest test | ||
|
This file contains 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 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,6 +1,7 @@ | ||
# Copyright (c) Jupyter Development Team. | ||
# Distributed under the terms of the Modified BSD License. | ||
FROM jupyter/pyspark-notebook | ||
ARG BASE_CONTAINER=jupyter/pyspark-notebook | ||
FROM $BASE_CONTAINER | ||
|
||
LABEL maintainer="Jupyter Project <[email protected]>" | ||
|
||
|
@@ -14,27 +15,26 @@ RUN fix-permissions $R_LIBS_USER | |
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
fonts-dejavu \ | ||
tzdata \ | ||
gfortran \ | ||
gcc && apt-get clean && \ | ||
gcc && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
USER $NB_UID | ||
|
||
# R packages | ||
RUN conda install --quiet --yes \ | ||
'r-base=3.4.1' \ | ||
'r-base=3.5.1' \ | ||
'r-irkernel=0.8*' \ | ||
'r-ggplot2=2.2*' \ | ||
'r-sparklyr=0.7*' \ | ||
'r-ggplot2=3.1*' \ | ||
'r-sparklyr=0.9*' \ | ||
'r-rcurl=1.95*' && \ | ||
conda clean -tipsy && \ | ||
conda clean --all -f -y && \ | ||
fix-permissions $CONDA_DIR && \ | ||
fix-permissions /home/$NB_USER | ||
|
||
# Apache Toree kernel | ||
RUN pip install --no-cache-dir \ | ||
https://dist.apache.org/repos/dist/dev/incubator/toree/0.2.0-incubating-rc5/toree-pip/toree-0.2.0.tar.gz \ | ||
https://dist.apache.org/repos/dist/release/incubator/toree/0.3.0-incubating/toree-pip/toree-0.3.0.tar.gz \ | ||
&& \ | ||
jupyter toree install --sys-prefix && \ | ||
rm -rf /home/$NB_USER/.local && \ | ||
|
@@ -43,7 +43,7 @@ RUN pip install --no-cache-dir \ | |
|
||
# Spylon-kernel | ||
RUN conda install --quiet --yes 'spylon-kernel=0.4*' && \ | ||
conda clean -tipsy && \ | ||
conda clean --all -f -y && \ | ||
python -m spylon_kernel install --sys-prefix && \ | ||
rm -rf /home/$NB_USER/.local && \ | ||
fix-permissions $CONDA_DIR && \ | ||
|
This file contains 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 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,2 @@ | ||
INDEX_ROW="|\`${BUILD_TIMESTAMP}\`|\`jupyter/${IMAGE_SHORT_NAME}:${GIT_SHA_TAG}\`|[Git diff](https://github.com/jupyter/docker-stacks/commit/${SOURCE_COMMIT})<br />[Dockerfile](https://github.com/jupyter/docker-stacks/blob/${SOURCE_COMMIT}/${IMAGE_SHORT_NAME}/Dockerfile)<br />[Build manifest](./${IMAGE_SHORT_NAME}-${GIT_SHA_TAG})|" | ||
sed "/|-|/a ${INDEX_ROW}" -i "$INDEX_FILE" |
This file contains 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,46 @@ | ||
cat << EOF > "$MANIFEST_FILE" | ||
* Build datetime: ${BUILD_TIMESTAMP} | ||
* DockerHub build code: ${BUILD_CODE} | ||
* Docker image: ${DOCKER_REPO}:${GIT_SHA_TAG} | ||
* Git commit SHA: [${SOURCE_COMMIT}](https://github.com/jupyter/docker-stacks/commit/${SOURCE_COMMIT}) | ||
* Git commit message: | ||
\`\`\` | ||
${COMMIT_MSG} | ||
\`\`\` | ||
|
||
## Apache Spark | ||
|
||
\`\`\` | ||
$(docker run --rm ${IMAGE_NAME} bash -c '$SPARK_HOME/bin/spark-submit --version' 2>&1) | ||
\`\`\` | ||
|
||
## Python Packages | ||
|
||
\`\`\` | ||
$(docker run --rm ${IMAGE_NAME} python --version) | ||
\`\`\` | ||
|
||
\`\`\` | ||
$(docker run --rm ${IMAGE_NAME} conda info) | ||
\`\`\` | ||
|
||
\`\`\` | ||
$(docker run --rm ${IMAGE_NAME} conda list) | ||
\`\`\` | ||
|
||
## R Packages | ||
|
||
\`\`\` | ||
$(docker run --rm ${IMAGE_NAME} R --version) | ||
\`\`\` | ||
|
||
\`\`\` | ||
$(docker run --rm ${IMAGE_NAME} R --silent -e 'installed.packages(.Library)[, c(1,3)]') | ||
\`\`\` | ||
|
||
## Apt Packages | ||
|
||
\`\`\` | ||
$(docker run --rm ${IMAGE_NAME} apt list --installed) | ||
\`\`\` | ||
EOF |
This file contains 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,12 +1,50 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Tag the latest build with the short git sha. Push the tag in addition | ||
# to the "latest" tag already pushed. | ||
GIT_SHA_TAG=${SOURCE_COMMIT:0:12} | ||
docker tag $IMAGE_NAME $DOCKER_REPO:$GIT_SHA_TAG | ||
docker push $DOCKER_REPO:$GIT_SHA_TAG | ||
|
||
# Create a working directory. | ||
BUILD_TIMESTAMP=$(date -u +%FT%TZ) | ||
WORKDIR=$(mktemp -d) | ||
GIT_URI="[email protected]:jupyter/docker-stacks.wiki.git" | ||
GIT_SANDBOX="${WORKDIR}/docker-stacks.wiki" | ||
IMAGE_SHORT_NAME=$(basename $DOCKER_REPO) | ||
MANIFEST_FILE="${GIT_SANDBOX}/manifests/${IMAGE_SHORT_NAME}-${GIT_SHA_TAG}.md" | ||
INDEX_FILE="${GIT_SANDBOX}/Home.md" | ||
|
||
# Configure git so it can push back to GitHub. | ||
eval $(ssh-agent -s) | ||
ssh-add <(echo "$DEPLOY_KEY") | ||
ssh-add -l | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Jupyter Docker Stacks" | ||
|
||
# Glone the GitHub project wiki. | ||
pushd "$WORKDIR" | ||
git clone "$GIT_URI" | ||
popd | ||
|
||
# Render the build manifest template. | ||
mkdir -p $(dirname "$MANIFEST_FILE") | ||
source hooks/manifest.tmpl | ||
source hooks/index.tmpl | ||
|
||
# Push the wiki update back to GitHub. | ||
pushd "$GIT_SANDBOX" | ||
git add . | ||
git commit -m "DOC: Build ${MANIFEST_FILE}" | ||
git push -u origin master | ||
popd | ||
|
||
# Shutdown the ssh agent for good measure. | ||
ssh-agent -k | ||
|
||
# Invoke all downstream build triggers. | ||
set +e | ||
for url in $(echo $NEXT_BUILD_TRIGGERS | sed "s/,/ /g") | ||
do | ||
curl -X POST $url | ||
|
Oops, something went wrong.