Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
Jupyter Docker Stacks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Jupyter Docker Stacks
Commits
34e73d4f
Commit
34e73d4f
authored
Jul 28, 2020
by
Peter Parente
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor wiki hooks for Actions
parent
99b02d3b
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
438 additions
and
591 deletions
+438
-591
.github/workflows/docker.yml
.github/workflows/docker.yml
+28
-6
Makefile
Makefile
+19
-15
all-spark-notebook/hooks/index.tmpl
all-spark-notebook/hooks/index.tmpl
+0
-2
all-spark-notebook/hooks/post_push
all-spark-notebook/hooks/post_push
+0
-51
all-spark-notebook/hooks/run_hook
all-spark-notebook/hooks/run_hook
+16
-1
base-notebook/hooks/apply_tags
base-notebook/hooks/apply_tags
+0
-15
base-notebook/hooks/index.tmpl
base-notebook/hooks/index.tmpl
+0
-2
base-notebook/hooks/manifest.tmpl
base-notebook/hooks/manifest.tmpl
+0
-31
base-notebook/hooks/post_checkout
base-notebook/hooks/post_checkout
+0
-4
base-notebook/hooks/post_push
base-notebook/hooks/post_push
+0
-49
base-notebook/hooks/run_hook
base-notebook/hooks/run_hook
+56
-0
datascience-notebook/hooks/index.tmpl
datascience-notebook/hooks/index.tmpl
+0
-2
datascience-notebook/hooks/post_push
datascience-notebook/hooks/post_push
+0
-55
datascience-notebook/hooks/run_hook
datascience-notebook/hooks/run_hook
+78
-0
minimal-notebook/hooks/index.tmpl
minimal-notebook/hooks/index.tmpl
+0
-2
minimal-notebook/hooks/manifest.tmpl
minimal-notebook/hooks/manifest.tmpl
+0
-31
minimal-notebook/hooks/post_push
minimal-notebook/hooks/post_push
+0
-51
minimal-notebook/hooks/run_hook
minimal-notebook/hooks/run_hook
+45
-0
pyspark-notebook/hooks/index.tmpl
pyspark-notebook/hooks/index.tmpl
+0
-2
pyspark-notebook/hooks/post_push
pyspark-notebook/hooks/post_push
+0
-51
pyspark-notebook/hooks/run_hook
pyspark-notebook/hooks/run_hook
+51
-0
r-notebook/hooks/index.tmpl
r-notebook/hooks/index.tmpl
+0
-2
r-notebook/hooks/post_push
r-notebook/hooks/post_push
+0
-51
r-notebook/hooks/run_hook
r-notebook/hooks/run_hook
+55
-0
scipy-notebook/hooks/index.tmpl
scipy-notebook/hooks/index.tmpl
+0
-2
scipy-notebook/hooks/manifest.tmpl
scipy-notebook/hooks/manifest.tmpl
+0
-31
scipy-notebook/hooks/post_push
scipy-notebook/hooks/post_push
+0
-51
scipy-notebook/hooks/run_hook
scipy-notebook/hooks/run_hook
+45
-0
tensorflow-notebook/hooks/index.tmpl
tensorflow-notebook/hooks/index.tmpl
+0
-2
tensorflow-notebook/hooks/manifest.tmpl
tensorflow-notebook/hooks/manifest.tmpl
+0
-31
tensorflow-notebook/hooks/post_push
tensorflow-notebook/hooks/post_push
+0
-51
tensorflow-notebook/hooks/run_hook
tensorflow-notebook/hooks/run_hook
+45
-0
No files found.
.github/workflows/docker.yml
View file @
34e73d4f
...
@@ -13,8 +13,21 @@ jobs:
...
@@ -13,8 +13,21 @@ jobs:
name
:
Build Docker Images
name
:
Build Docker Images
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
steps
:
steps
:
-
name
:
C
heckout
Repo
-
name
:
C
lone Main
Repo
uses
:
actions/checkout@v2
uses
:
actions/checkout@v2
-
name
:
Debug
run
:
|
pwd
ls -al
-
name
:
Clone Wiki
uses
:
actions/checkout@v2
with
:
repository
:
${{github.repository}}.wiki
path
:
"
${{github.repository}}.wiki"
-
name
:
Debug
run
:
|
pwd
ls -al
-
name
:
Set Up Python
-
name
:
Set Up Python
uses
:
actions/setup-python@v2
uses
:
actions/setup-python@v2
with
:
with
:
...
@@ -25,10 +38,13 @@ jobs:
...
@@ -25,10 +38,13 @@ jobs:
make dev-env lint-install
make dev-env lint-install
-
name
:
Lint Dockerfiles
-
name
:
Lint Dockerfiles
run
:
make lint-all
run
:
make lint-all
-
name
:
Debug python
run
:
which pytest
-
name
:
Build Docker Images
-
name
:
Build Docker Images
run
:
make build-test-all
run
:
make build/base-notebook test/base-notebook
# build-test-all
-
name
:
Run Post-Build Hooks
run
:
make hook/base-notebook
#hooks-all
env
:
COMMIT_MSG
:
"
${{github.event.head_commit.message}}"
WIKI_PATH
:
"
${{runner.temp}}/${{github.repository}}.wiki"
push
:
push
:
name
:
Push Docker Images
name
:
Push Docker Images
...
@@ -37,5 +53,11 @@ jobs:
...
@@ -37,5 +53,11 @@ jobs:
-
build
-
build
if
:
github.ref == 'refs/heads/master'
if
:
github.ref == 'refs/heads/master'
steps
:
steps
:
-
name
:
TODO
-
name
:
Push Images
run
:
echo "todo"
run
:
make push-all
# TODO: doesn't support working directory
-
name
:
Push Wiki
uses
:
mikeal/publish-to-github-action@master
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY
:
${{github.repository}}.wiki
Makefile
View file @
34e73d4f
...
@@ -76,6 +76,18 @@ dev/%: ## run a foreground container for a stack
...
@@ -76,6 +76,18 @@ dev/%: ## run a foreground container for a stack
dev-env
:
##
install libraries required to build docs and run tests
dev-env
:
##
install libraries required to build docs and run tests
pip
install
-r
requirements-dev.txt
pip
install
-r
requirements-dev.txt
hook/%
:
export COMMIT_MSG?=$(shell git log -1 --pretty=%B)
hook/%
:
export GITHUB_SHA?=$(shell git rev-parse HEAD)
hook/%
:
export WIKI_PATH?=./wiki
hook/%
:
##
run post-build hooks for an image
BUILD_TIMESTAMP
=
"
$$
(date -u +%FT%TZ)"
\
DOCKER_REPO
=
"
$(OWNER)
/
$(
notdir
$@
)
"
\
IMAGE_NAME
=
"
$(OWNER)
/
$(
notdir
$@
)
:latest"
\
IMAGE_SHORT_NAME
=
"
$(
notdir
$@
)
"
\
$(SHELL)
$(
notdir
$@
)
/hooks/run_hook
hook-all
:
$(foreach I
,
$(ALL_IMAGES)
,
hook/$(I) )
##
run post-build hooks for all images
lint/%
:
ARGS?=
lint/%
:
ARGS?=
lint/%
:
##
lint the dockerfile(s) for a stack
lint/%
:
##
lint the dockerfile(s) for a stack
@
echo
"Linting Dockerfiles in
$(
notdir
$@
)
..."
@
echo
"Linting Dockerfiles in
$(
notdir
$@
)
..."
...
@@ -121,6 +133,12 @@ pull/%: DARGS?=
...
@@ -121,6 +133,12 @@ pull/%: DARGS?=
pull/%
:
##
pull a jupyter image
pull/%
:
##
pull a jupyter image
docker pull
$(DARGS)
$(OWNER)
/
$(
notdir
$@
)
docker pull
$(DARGS)
$(OWNER)
/
$(
notdir
$@
)
push/%
:
DARGS?=
push/%
:
##
push all tags for a jupyter image
docker push
$(DARGS)
$(OWNER)
/
$(
notdir
$@
)
push-all
:
$(foreach I
,
$(ALL_IMAGES)
,
push/$(I) )
##
push all tagged images
run/%
:
DARGS?=
run/%
:
DARGS?=
run/%
:
##
run a bash in interactive mode in a stack
run/%
:
##
run a bash in interactive mode in a stack
docker run
-it
--rm
$(DARGS)
$(OWNER)
/
$(
notdir
$@
)
$(SHELL)
docker run
-it
--rm
$(DARGS)
$(OWNER)
/
$(
notdir
$@
)
$(SHELL)
...
@@ -129,22 +147,8 @@ run-sudo/%: DARGS?=
...
@@ -129,22 +147,8 @@ run-sudo/%: DARGS?=
run-sudo/%
:
##
run a bash in interactive mode as root in a stack
run-sudo/%
:
##
run a bash in interactive mode as root in a stack
docker run
-it
--rm
-u
root
$(DARGS)
$(OWNER)
/
$(
notdir
$@
)
$(SHELL)
docker run
-it
--rm
-u
root
$(DARGS)
$(OWNER)
/
$(
notdir
$@
)
$(SHELL)
tx-en
:
##
rebuild en locale strings and push to master (req: GH_TOKEN)
@
git config
--global
user.email
"travis@travis-ci.org"
@
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 (only common tests or common tests + specific tests)
test/%
:
##
run tests against a stack (only common tests or common tests + specific tests)
@
if
[
!
-d
"
$(
notdir
$@
)
/test"
]
;
then
TEST_IMAGE
=
"
$(OWNER)
/
$(
notdir
$@
)
"
pytest
-m
"not info"
test
;
\
@
if
[
!
-d
"
$(
notdir
$@
)
/test"
]
;
then
TEST_IMAGE
=
"
$(OWNER)
/
$(
notdir
$@
)
"
pytest
-m
"not info"
test
;
\
else
TEST_IMAGE
=
"
$(OWNER)
/
$(
notdir
$@
)
"
pytest
-m
"not info"
test
$(
notdir
$@
)
/test
;
fi
else
TEST_IMAGE
=
"
$(OWNER)
/
$(
notdir
$@
)
"
pytest
-m
"not info"
test
$(
notdir
$@
)
/test
;
fi
test-all
:
$(foreach I
,
$(ALL_IMAGES)
,
test/$(I))
##
test all stacks
test-all
:
$(foreach I
,
$(ALL_IMAGES)
,
test/$(I))
##
test all stacks
\ No newline at end of file
all-spark-notebook/hooks/index.tmpl
deleted
100644 → 0
View file @
99b02d3b
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"
\ No newline at end of file
all-spark-notebook/hooks/post_push
deleted
100755 → 0
View file @
99b02d3b
#!/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
=
"git@github.com: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 <
(
base64
-d
<
(
echo
"
$DEPLOY_KEY
"
))
ssh-add
-l
git config
--global
user.email
"jupyter@googlegroups.com"
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
done
\ No newline at end of file
all-spark-notebook/hooks/
manifest.tmpl
→
all-spark-notebook/hooks/
run_hook
100644 → 100755
View file @
34e73d4f
#!/bin/bash
set
-e
# Apply tags
GIT_SHA_TAG
=
${
GITHUB_SHA
:0:12
}
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
$GIT_SHA_TAG
"
# Update index
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
"
${
WIKI_PATH
}
/Home.md"
# Build manifest
MANIFEST_FILE
=
"
${
WIKI_PATH
}
/manifests/
${
IMAGE_SHORT_NAME
}
-
${
GIT_SHA_TAG
}
.md"
mkdir
-p
$(
dirname
"
$MANIFEST_FILE
"
)
cat
<<
EOF
> "
$MANIFEST_FILE
"
cat
<<
EOF
> "
$MANIFEST_FILE
"
* Build datetime:
${
BUILD_TIMESTAMP
}
* Build datetime:
${
BUILD_TIMESTAMP
}
* DockerHub build code:
${
BUILD_CODE
}
* DockerHub build code:
${
BUILD_CODE
}
* Docker image:
${
DOCKER_REPO
}
:
${
GIT_SHA_TAG
}
* Docker image:
${
DOCKER_REPO
}
:
${
GIT_SHA_TAG
}
* Docker image size:
$(
docker images
${
IMAGE_NAME
}
--format
"{{.Size}}"
)
* Docker image size:
$(
docker images
${
IMAGE_NAME
}
--format
"{{.Size}}"
)
* Git commit SHA: [${
SOURCE_COMMIT}](https://github.com/jupyter/docker-stacks/commit/${SOURCE_COMMIT
})
* Git commit SHA: [
${
GITHUB_SHA
}
](https://github.com/jupyter/docker-stacks/commit/
${
GITHUB_SHA
}
)
* Git commit message:
* Git commit message:
\`\`\`
\`\`\`
${
COMMIT_MSG
}
${
COMMIT_MSG
}
...
...
base-notebook/hooks/apply_tags
deleted
100644 → 0
View file @
99b02d3b
#!/bin/bash
set
-e
# Tag the latest build with the short git sha as well as version of key runtimes
# and packages.
GIT_SHA_TAG
=
${
SOURCE_COMMIT
:0:12
}
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
$GIT_SHA_TAG
"
PY_VERSION_TAG
=
"python-
$(
docker run
--rm
${
IMAGE_NAME
}
python
--version
2>&1 |
awk
'{print $2}'
)
"
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
$PY_VERSION_TAG
"
NB_VERSION_TAG
=
"notebook-
$(
docker run
--rm
-a
STDOUT
${
IMAGE_NAME
}
jupyter-notebook
--version
|
tr
-d
'\r'
)
"
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
${
NB_VERSION_TAG
%%
}
"
LAB_VERSION_TAG
=
"lab-
$(
docker run
--rm
-a
STDOUT
${
IMAGE_NAME
}
jupyter-lab
--version
|
tr
-d
'\r'
)
"
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
${
LAB_VERSION_TAG
%%\r
}
"
HUB_VERSION_TAG
=
"hub-
$(
docker run
--rm
-a
STDOUT
${
IMAGE_NAME
}
jupyterhub
--version
|
tr
-d
'\r'
)
"
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
${
HUB_VERSION_TAG
%%\r
}
"
\ No newline at end of file
base-notebook/hooks/index.tmpl
deleted
100644 → 0
View file @
99b02d3b
INDEX_ROW="|\`${BUILD_TIMESTAMP}\`|\`jupyter/${IMAGE_SHORT_NAME}:${GIT_SHA_TAG}\`<br />\`jupyter/${IMAGE_SHORT_NAME}:${PY_VERSION_TAG}\`<br />\`jupyter/${IMAGE_SHORT_NAME}:${NB_VERSION_TAG}\`<br />\`jupyter/${IMAGE_SHORT_NAME}:${LAB_VERSION_TAG}\`<br />\`jupyter/${IMAGE_SHORT_NAME}:${HUB_VERSION_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"
\ No newline at end of file
base-notebook/hooks/manifest.tmpl
deleted
100644 → 0
View file @
99b02d3b
cat << EOF > "$MANIFEST_FILE"
* Build datetime: ${BUILD_TIMESTAMP}
* DockerHub build code: ${BUILD_CODE}
* Docker image: ${DOCKER_REPO}:${GIT_SHA_TAG}
* Docker image size: $(docker images ${IMAGE_NAME} --format "{{.Size}}")
* Git commit SHA: [${SOURCE_COMMIT}](https://github.com/jupyter/docker-stacks/commit/${SOURCE_COMMIT})
* Git commit message:
\`\`\`
${COMMIT_MSG}
\`\`\`
## Python Packages
\`\`\`
$(docker run --rm ${IMAGE_NAME} python --version)
\`\`\`
\`\`\`
$(docker run --rm ${IMAGE_NAME} conda info)
\`\`\`
\`\`\`
$(docker run --rm ${IMAGE_NAME} conda list)
\`\`\`
## Apt Packages
\`\`\`
$(docker run --rm ${IMAGE_NAME} apt list --installed)
\`\`\`
EOF
\ No newline at end of file
base-notebook/hooks/post_checkout
deleted
100644 → 0
View file @
99b02d3b
#!/bin/bash
if
[[
"
$COMMIT_MSG
"
=
*
"skip ci"
*
||
"
$COMMIT_MSG
"
=
*
"ci skip"
*
]]
;
then
exit
1
;
fi
\ No newline at end of file
base-notebook/hooks/post_push
deleted
100755 → 0
View file @
99b02d3b
#!/bin/bash
set
-e
# Apply and push all tags
source
hooks/apply_tags
docker push
$DOCKER_REPO
# Create a working directory.
BUILD_TIMESTAMP
=
$(
date
-u
+%FT%TZ
)
WORKDIR
=
$(
mktemp
-d
)
GIT_URI
=
"git@github.com: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 <
(
base64
-d
<
(
echo
"
$DEPLOY_KEY
"
))
ssh-add
-l
git config
--global
user.email
"jupyter@googlegroups.com"
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
done
\ No newline at end of file
base-notebook/hooks/run_hook
0 → 100755
View file @
34e73d4f
#!/bin/bash
set
-e
# Apply tags
GIT_SHA_TAG
=
${
GITHUB_SHA
:0:12
}
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
$GIT_SHA_TAG
"
PY_VERSION_TAG
=
"python-
$(
docker run
--rm
${
IMAGE_NAME
}
python
--version
2>&1 |
awk
'{print $2}'
)
"
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
$PY_VERSION_TAG
"
NB_VERSION_TAG
=
"notebook-
$(
docker run
--rm
-a
STDOUT
${
IMAGE_NAME
}
jupyter-notebook
--version
|
tr
-d
'\r'
)
"
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
${
NB_VERSION_TAG
%%
}
"
LAB_VERSION_TAG
=
"lab-
$(
docker run
--rm
-a
STDOUT
${
IMAGE_NAME
}
jupyter-lab
--version
|
tr
-d
'\r'
)
"
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
${
LAB_VERSION_TAG
%%\r
}
"
HUB_VERSION_TAG
=
"hub-
$(
docker run
--rm
-a
STDOUT
${
IMAGE_NAME
}
jupyterhub
--version
|
tr
-d
'\r'
)
"
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
${
HUB_VERSION_TAG
%%\r
}
"
# Update index
INDEX_FILE
=
"
${
WIKI_PATH
}
/Home.md"
INDEX_ROW
=
"|
\`
${
BUILD_TIMESTAMP
}
\`
|
\`
jupyter/
${
IMAGE_SHORT_NAME
}
:
${
GIT_SHA_TAG
}
\`
<br />
\`
jupyter/
${
IMAGE_SHORT_NAME
}
:
${
PY_VERSION_TAG
}
\`
<br />
\`
jupyter/
${
IMAGE_SHORT_NAME
}
:
${
NB_VERSION_TAG
}
\`
<br />
\`
jupyter/
${
IMAGE_SHORT_NAME
}
:
${
LAB_VERSION_TAG
}
\`
<br />
\`
jupyter/
${
IMAGE_SHORT_NAME
}
:
${
HUB_VERSION_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
"
head
-n
25
"
$INDEX_FILE
"
# Build manifest
MANIFEST_FILE
=
"
${
WIKI_PATH
}
/manifests/
${
IMAGE_SHORT_NAME
}
-
${
GIT_SHA_TAG
}
.md"
mkdir
-p
$(
dirname
"
$MANIFEST_FILE
"
)
cat
<<
EOF
> "
$MANIFEST_FILE
"
* Build datetime:
${
BUILD_TIMESTAMP
}
* Docker image:
${
DOCKER_REPO
}
:
${
GIT_SHA_TAG
}
* Docker image size:
$(
docker images
${
IMAGE_NAME
}
--format
"{{.Size}}"
)
* Git commit SHA: [
${
GITHUB_SHA
}
](https://github.com/jupyter/docker-stacks/commit/
${
GITHUB_SHA
}
)
* Git commit message:
\`\`\`
${
COMMIT_MSG
}
\`\`\`
## Python Packages
\`\`\`
$(
docker run
--rm
${
IMAGE_NAME
}
python
--version
)
\`\`\`
\`\`\`
$(
docker run
--rm
${
IMAGE_NAME
}
conda info
)
\`\`\`
\`\`\`
$(
docker run
--rm
${
IMAGE_NAME
}
conda list
)
\`\`\`
## Apt Packages
\`\`\`
$(
docker run
--rm
${
IMAGE_NAME
}
apt list
--installed
)
\`\`\`
EOF
cat
"
$MANIFEST_FILE
"
\ No newline at end of file
datascience-notebook/hooks/index.tmpl
deleted
100644 → 0
View file @
99b02d3b
INDEX_ROW="|\`${BUILD_TIMESTAMP}\`|\`jupyter/${IMAGE_SHORT_NAME}:${GIT_SHA_TAG}\`<br />\`jupyter/${IMAGE_SHORT_NAME}:${PY_VERSION_TAG}\`<br />\`jupyter/${IMAGE_SHORT_NAME}:${JULIA_VERSION_TAG}\`<br />\`jupyter/${IMAGE_SHORT_NAME}:${R_VERSION_TAG}\`<br />\`jupyter/${IMAGE_SHORT_NAME}:${NB_VERSION_TAG}\`<br />\`jupyter/${IMAGE_SHORT_NAME}:${LAB_VERSION_TAG}\`<br />\`jupyter/${IMAGE_SHORT_NAME}:${HUB_VERSION_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"
\ No newline at end of file
datascience-notebook/hooks/post_push
deleted
100755 → 0
View file @
99b02d3b
#!/bin/bash
set
-e
# Apply and push all tags
source
hooks/apply_tags
docker push
$DOCKER_REPO
# 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
=
"git@github.com: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 <
(
base64
-d
<
(
echo
"
$DEPLOY_KEY
"
))
ssh-add
-l
git config
--global
user.email
"jupyter@googlegroups.com"
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
done
datascience-notebook/hooks/
apply_tags
→
datascience-notebook/hooks/
run_hook
100644 → 100755
View file @
34e73d4f
#!/bin/bash
#!/bin/bash
set
-e
set
-e
# Tag the latest build with the short git sha as well as version of key runtimes
# Apply tags
# and packages.
GIT_SHA_TAG
=
${
GITHUB_SHA
:0:12
}
GIT_SHA_TAG
=
${
SOURCE_COMMIT
:0:12
}
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
$GIT_SHA_TAG
"
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
$GIT_SHA_TAG
"
PY_VERSION_TAG
=
"python-
$(
docker run
--rm
${
IMAGE_NAME
}
python
--version
2>&1 |
awk
'{print $2}'
)
"
PY_VERSION_TAG
=
"python-
$(
docker run
--rm
${
IMAGE_NAME
}
python
--version
2>&1 |
awk
'{print $2}'
)
"
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
$PY_VERSION_TAG
"
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
$PY_VERSION_TAG
"
...
@@ -17,3 +16,63 @@ LAB_VERSION_TAG="lab-$(docker run --rm -a STDOUT ${IMAGE_NAME} jupyter-lab --ver
...
@@ -17,3 +16,63 @@ LAB_VERSION_TAG="lab-$(docker run --rm -a STDOUT ${IMAGE_NAME} jupyter-lab --ver
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
${
LAB_VERSION_TAG
%%\r
}
"
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
${
LAB_VERSION_TAG
%%\r
}
"
HUB_VERSION_TAG
=
"hub-
$(
docker run
--rm
-a
STDOUT
${
IMAGE_NAME
}
jupyterhub
--version
|
tr
-d
'\r'
)
"
HUB_VERSION_TAG
=
"hub-
$(
docker run
--rm
-a
STDOUT
${
IMAGE_NAME
}
jupyterhub
--version
|
tr
-d
'\r'
)
"
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
${
HUB_VERSION_TAG
%%\r
}
"
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
${
HUB_VERSION_TAG
%%\r
}
"
# Update index
INDEX_ROW
=
"|
\`
${
BUILD_TIMESTAMP
}
\`
|
\`
jupyter/
${
IMAGE_SHORT_NAME
}
:
${
GIT_SHA_TAG
}
\`
<br />
\`
jupyter/
${
IMAGE_SHORT_NAME
}
:
${
PY_VERSION_TAG
}
\`
<br />
\`
jupyter/
${
IMAGE_SHORT_NAME
}
:
${
JULIA_VERSION_TAG
}
\`
<br />
\`
jupyter/
${
IMAGE_SHORT_NAME
}
:
${
R_VERSION_TAG
}
\`
<br />
\`
jupyter/
${
IMAGE_SHORT_NAME
}
:
${
NB_VERSION_TAG
}
\`
<br />
\`
jupyter/
${
IMAGE_SHORT_NAME
}
:
${
LAB_VERSION_TAG
}
\`
<br />
\`
jupyter/
${
IMAGE_SHORT_NAME
}
:
${
HUB_VERSION_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
"
${
WIKI_PATH
}
/Home.md"
# Build manifest
MANIFEST_FILE
=
"
${
WIKI_PATH
}
/manifests/
${
IMAGE_SHORT_NAME
}
-
${
GIT_SHA_TAG
}
.md"
mkdir
-p
$(
dirname
"
$MANIFEST_FILE
"
)
cat
<<
EOF
> "
$MANIFEST_FILE
"
* Build datetime:
${
BUILD_TIMESTAMP
}
* Docker image:
${
DOCKER_REPO
}
:
${
GIT_SHA_TAG
}
* Docker image size:
$(
docker images
${
IMAGE_NAME
}
--format
"{{.Size}}"
)
* Git commit SHA: [
${
GITHUB_SHA
}
](https://github.com/jupyter/docker-stacks/commit/
${
GITHUB_SHA
}
)
* Git commit message:
\`\`\`
${
COMMIT_MSG
}
\`\`\`
## Julia Packages
\`\`\`
$(
docker run
--rm
${
IMAGE_NAME
}
julia
-E
'using InteractiveUtils; versioninfo()'
)
\`\`\`
\`\`\`
$(
docker run
--rm
${
IMAGE_NAME
}
julia
-E
'import Pkg; Pkg.status()'
)
\`\`\`
## 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
\ No newline at end of file
minimal-notebook/hooks/index.tmpl
deleted
100644 → 0
View file @
99b02d3b
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"
\ No newline at end of file
minimal-notebook/hooks/manifest.tmpl
deleted
100644 → 0
View file @
99b02d3b
cat << EOF > "$MANIFEST_FILE"
* Build datetime: ${BUILD_TIMESTAMP}
* DockerHub build code: ${BUILD_CODE}
* Docker image: ${DOCKER_REPO}:${GIT_SHA_TAG}
* Docker image size: $(docker images ${IMAGE_NAME} --format "{{.Size}}")
* Git commit SHA: [${SOURCE_COMMIT}](https://github.com/jupyter/docker-stacks/commit/${SOURCE_COMMIT})
* Git commit message:
\`\`\`
${COMMIT_MSG}
\`\`\`
## Python Packages
\`\`\`
$(docker run --rm ${IMAGE_NAME} python --version)
\`\`\`
\`\`\`
$(docker run --rm ${IMAGE_NAME} conda info)
\`\`\`
\`\`\`
$(docker run --rm ${IMAGE_NAME} conda list)
\`\`\`
## Apt Packages
\`\`\`
$(docker run --rm ${IMAGE_NAME} apt list --installed)
\`\`\`
EOF
\ No newline at end of file
minimal-notebook/hooks/post_push
deleted
100755 → 0
View file @
99b02d3b
#!/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
=
"git@github.com: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 <
(
base64
-d
<
(
echo
"
$DEPLOY_KEY
"
))
ssh-add
-l
git config
--global
user.email
"jupyter@googlegroups.com"
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
done
\ No newline at end of file
r-notebook/hooks/manifest.tmpl
→
minimal-notebook/hooks/run_hook
100644 → 100755
View file @
34e73d4f
#!/bin/bash
set
-e
# Apply tags
GIT_SHA_TAG
=
${
GITHUB_SHA
:0:12
}
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
$GIT_SHA_TAG
"
# Update index
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
"
${
WIKI_PATH
}
/Home.md"
# Build manifest
MANIFEST_FILE
=
"
${
WIKI_PATH
}
/manifests/
${
IMAGE_SHORT_NAME
}
-
${
GIT_SHA_TAG
}
.md"
mkdir
-p
$(
dirname
"
$MANIFEST_FILE
"
)
cat
<<
EOF
> "
$MANIFEST_FILE
"
cat
<<
EOF
> "
$MANIFEST_FILE
"
* Build datetime:
${
BUILD_TIMESTAMP
}
* Build datetime:
${
BUILD_TIMESTAMP
}
* DockerHub build code: ${BUILD_CODE}
* Docker image:
${
DOCKER_REPO
}
:
${
GIT_SHA_TAG
}
* Docker image:
${
DOCKER_REPO
}
:
${
GIT_SHA_TAG
}
* Docker image size:
$(
docker images
${
IMAGE_NAME
}
--format
"{{.Size}}"
)
* Docker image size:
$(
docker images
${
IMAGE_NAME
}
--format
"{{.Size}}"
)
* Git commit SHA: [${
SOURCE_COMMIT}](https://github.com/jupyter/docker-stacks/commit/${SOURCE_COMMIT
})
* Git commit SHA: [
${
GITHUB_SHA
}
](https://github.com/jupyter/docker-stacks/commit/
${
GITHUB_SHA
}
)
* Git commit message:
* Git commit message:
\`\`\`
\`\`\`
${
COMMIT_MSG
}
${
COMMIT_MSG
}
\`\`\`
\`\`\`
## R Packages
\`\`\`
$(docker run --rm ${IMAGE_NAME} R --version)
\`\`\`
\`\`\`
$(docker run --rm ${IMAGE_NAME} R --silent -e 'installed.packages(.Library)[, c(1,3)]')
\`\`\`
## Python Packages
## Python Packages
\`\`\`
\`\`\`
...
...
pyspark-notebook/hooks/index.tmpl
deleted
100644 → 0
View file @
99b02d3b
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"
\ No newline at end of file
pyspark-notebook/hooks/post_push
deleted
100755 → 0
View file @
99b02d3b
#!/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
=
"git@github.com: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 <
(
base64
-d
<
(
echo
"
$DEPLOY_KEY
"
))
ssh-add
-l
git config
--global
user.email
"jupyter@googlegroups.com"
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
done
\ No newline at end of file
pyspark-notebook/hooks/
manifest.tmpl
→
pyspark-notebook/hooks/
run_hook
100644 → 100755
View file @
34e73d4f
#!/bin/bash
set
-e
# Apply tags
GIT_SHA_TAG
=
${
GITHUB_SHA
:0:12
}
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
$GIT_SHA_TAG
"
# Update index
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
"
${
WIKI_PATH
}
/Home.md"
# Build manifest
MANIFEST_FILE
=
"
${
WIKI_PATH
}
/manifests/
${
IMAGE_SHORT_NAME
}
-
${
GIT_SHA_TAG
}
.md"
mkdir
-p
$(
dirname
"
$MANIFEST_FILE
"
)
cat
<<
EOF
> "
$MANIFEST_FILE
"
cat
<<
EOF
> "
$MANIFEST_FILE
"
* Build datetime:
${
BUILD_TIMESTAMP
}
* Build datetime:
${
BUILD_TIMESTAMP
}
* DockerHub build code: ${BUILD_CODE}
* Docker image:
${
DOCKER_REPO
}
:
${
GIT_SHA_TAG
}
* Docker image:
${
DOCKER_REPO
}
:
${
GIT_SHA_TAG
}
* Docker image size:
$(
docker images
${
IMAGE_NAME
}
--format
"{{.Size}}"
)
* Docker image size:
$(
docker images
${
IMAGE_NAME
}
--format
"{{.Size}}"
)
* Git commit SHA: [${
SOURCE_COMMIT}](https://github.com/jupyter/docker-stacks/commit/${SOURCE_COMMIT
})
* Git commit SHA: [
${
GITHUB_SHA
}
](https://github.com/jupyter/docker-stacks/commit/
${
GITHUB_SHA
}
)
* Git commit message:
* Git commit message:
\`\`\`
\`\`\`
${
COMMIT_MSG
}
${
COMMIT_MSG
}
...
...
r-notebook/hooks/index.tmpl
deleted
100644 → 0
View file @
99b02d3b
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"
\ No newline at end of file
r-notebook/hooks/post_push
deleted
100755 → 0
View file @
99b02d3b
#!/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
=
"git@github.com: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 <
(
base64
-d
<
(
echo
"
$DEPLOY_KEY
"
))
ssh-add
-l
git config
--global
user.email
"jupyter@googlegroups.com"
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
done
\ No newline at end of file
datascience-notebook/hooks/manifest.tmpl
→
r-notebook/hooks/run_hook
100644 → 100755
View file @
34e73d4f
#!/bin/bash
set
-e
# Apply tags
GIT_SHA_TAG
=
${
GITHUB_SHA
:0:12
}
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
$GIT_SHA_TAG
"
# Update index
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
"
${
WIKI_PATH
}
/Home.md"
# Build manifest
MANIFEST_FILE
=
"
${
WIKI_PATH
}
/manifests/
${
IMAGE_SHORT_NAME
}
-
${
GIT_SHA_TAG
}
.md"
mkdir
-p
$(
dirname
"
$MANIFEST_FILE
"
)
cat
<<
EOF
> "
$MANIFEST_FILE
"
cat
<<
EOF
> "
$MANIFEST_FILE
"
* Build datetime:
${
BUILD_TIMESTAMP
}
* Build datetime:
${
BUILD_TIMESTAMP
}
* DockerHub build code: ${BUILD_CODE}
* Docker image:
${
DOCKER_REPO
}
:
${
GIT_SHA_TAG
}
* Docker image:
${
DOCKER_REPO
}
:
${
GIT_SHA_TAG
}
* Docker image size:
$(
docker images
${
IMAGE_NAME
}
--format
"{{.Size}}"
)
* Docker image size:
$(
docker images
${
IMAGE_NAME
}
--format
"{{.Size}}"
)
* Git commit SHA: [${
SOURCE_COMMIT}](https://github.com/jupyter/docker-stacks/commit/${SOURCE_COMMIT
})
* Git commit SHA: [
${
GITHUB_SHA
}
](https://github.com/jupyter/docker-stacks/commit/
${
GITHUB_SHA
}
)
* Git commit message:
* Git commit message:
\`\`\`
\`\`\`
${
COMMIT_MSG
}
${
COMMIT_MSG
}
\`\`\`
\`\`\`
##
Julia
Packages
##
R
Packages
\`\`\`
\`\`\`
$(docker run --rm ${IMAGE_NAME}
julia -E 'using InteractiveUtils; versioninfo()'
)
$(
docker run
--rm
${
IMAGE_NAME
}
R
--version
)
\`\`\`
\`\`\`
\`\`\`
\`\`\`
$(docker run --rm ${IMAGE_NAME}
julia -E 'import Pkg; Pkg.status()
')
$(
docker run
--rm
${
IMAGE_NAME
}
R
--silent
-e
'installed.packages(.Library)[, c(1,3)]
'
)
\`\`\`
\`\`\`
## Python Packages
## Python Packages
...
@@ -33,16 +47,6 @@ $(docker run --rm ${IMAGE_NAME} conda info)
...
@@ -33,16 +47,6 @@ $(docker run --rm ${IMAGE_NAME} conda info)
$(
docker run
--rm
${
IMAGE_NAME
}
conda list
)
$(
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
## Apt Packages
\`\`\`
\`\`\`
...
...
scipy-notebook/hooks/index.tmpl
deleted
100644 → 0
View file @
99b02d3b
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"
\ No newline at end of file
scipy-notebook/hooks/manifest.tmpl
deleted
100644 → 0
View file @
99b02d3b
cat << EOF > "$MANIFEST_FILE"
* Build datetime: ${BUILD_TIMESTAMP}
* DockerHub build code: ${BUILD_CODE}
* Docker image: ${DOCKER_REPO}:${GIT_SHA_TAG}
* Docker image size: $(docker images ${IMAGE_NAME} --format "{{.Size}}")
* Git commit SHA: [${SOURCE_COMMIT}](https://github.com/jupyter/docker-stacks/commit/${SOURCE_COMMIT})
* Git commit message:
\`\`\`
${COMMIT_MSG}
\`\`\`
## Python Packages
\`\`\`
$(docker run --rm ${IMAGE_NAME} python --version)
\`\`\`
\`\`\`
$(docker run --rm ${IMAGE_NAME} conda info)
\`\`\`
\`\`\`
$(docker run --rm ${IMAGE_NAME} conda list)
\`\`\`
## Apt Packages
\`\`\`
$(docker run --rm ${IMAGE_NAME} apt list --installed)
\`\`\`
EOF
\ No newline at end of file
scipy-notebook/hooks/post_push
deleted
100755 → 0
View file @
99b02d3b
#!/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
=
"git@github.com: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 <
(
base64
-d
<
(
echo
"
$DEPLOY_KEY
"
))
ssh-add
-l
git config
--global
user.email
"jupyter@googlegroups.com"
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
done
\ No newline at end of file
scipy-notebook/hooks/run_hook
0 → 100755
View file @
34e73d4f
#!/bin/bash
set
-e
# Apply tags
GIT_SHA_TAG
=
${
GITHUB_SHA
:0:12
}
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
$GIT_SHA_TAG
"
# Update index
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
"
${
WIKI_PATH
}
/Home.md"
# Build manifest
MANIFEST_FILE
=
"
${
WIKI_PATH
}
/manifests/
${
IMAGE_SHORT_NAME
}
-
${
GIT_SHA_TAG
}
.md"
mkdir
-p
$(
dirname
"
$MANIFEST_FILE
"
)
cat
<<
EOF
> "
$MANIFEST_FILE
"
* Build datetime:
${
BUILD_TIMESTAMP
}
* Docker image:
${
DOCKER_REPO
}
:
${
GIT_SHA_TAG
}
* Docker image size:
$(
docker images
${
IMAGE_NAME
}
--format
"{{.Size}}"
)
* Git commit SHA: [
${
GITHUB_SHA
}
](https://github.com/jupyter/docker-stacks/commit/
${
GITHUB_SHA
}
)
* Git commit message:
\`\`\`
${
COMMIT_MSG
}
\`\`\`
## Python Packages
\`\`\`
$(
docker run
--rm
${
IMAGE_NAME
}
python
--version
)
\`\`\`
\`\`\`
$(
docker run
--rm
${
IMAGE_NAME
}
conda info
)
\`\`\`
\`\`\`
$(
docker run
--rm
${
IMAGE_NAME
}
conda list
)
\`\`\`
## Apt Packages
\`\`\`
$(
docker run
--rm
${
IMAGE_NAME
}
apt list
--installed
)
\`\`\`
EOF
\ No newline at end of file
tensorflow-notebook/hooks/index.tmpl
deleted
100644 → 0
View file @
99b02d3b
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"
\ No newline at end of file
tensorflow-notebook/hooks/manifest.tmpl
deleted
100644 → 0
View file @
99b02d3b
cat << EOF > "$MANIFEST_FILE"
* Build datetime: ${BUILD_TIMESTAMP}
* DockerHub build code: ${BUILD_CODE}
* Docker image: ${DOCKER_REPO}:${GIT_SHA_TAG}
* Docker image size: $(docker images ${IMAGE_NAME} --format "{{.Size}}")
* Git commit SHA: [${SOURCE_COMMIT}](https://github.com/jupyter/docker-stacks/commit/${SOURCE_COMMIT})
* Git commit message:
\`\`\`
${COMMIT_MSG}
\`\`\`
## Python Packages
\`\`\`
$(docker run --rm ${IMAGE_NAME} python --version)
\`\`\`
\`\`\`
$(docker run --rm ${IMAGE_NAME} conda info)
\`\`\`
\`\`\`
$(docker run --rm ${IMAGE_NAME} conda list)
\`\`\`
## Apt Packages
\`\`\`
$(docker run --rm ${IMAGE_NAME} apt list --installed)
\`\`\`
EOF
\ No newline at end of file
tensorflow-notebook/hooks/post_push
deleted
100755 → 0
View file @
99b02d3b
#!/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
=
"git@github.com: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 <
(
base64
-d
<
(
echo
"
$DEPLOY_KEY
"
))
ssh-add
-l
git config
--global
user.email
"jupyter@googlegroups.com"
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
done
\ No newline at end of file
tensorflow-notebook/hooks/run_hook
0 → 100755
View file @
34e73d4f
#!/bin/bash
set
-e
# Apply tags
GIT_SHA_TAG
=
${
GITHUB_SHA
:0:12
}
docker tag
$IMAGE_NAME
"
$DOCKER_REPO
:
$GIT_SHA_TAG
"
# Update index
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
"
${
WIKI_PATH
}
/Home.md"
# Build manifest
MANIFEST_FILE
=
"
${
WIKI_PATH
}
/manifests/
${
IMAGE_SHORT_NAME
}
-
${
GIT_SHA_TAG
}
.md"
mkdir
-p
$(
dirname
"
$MANIFEST_FILE
"
)
cat
<<
EOF
> "
$MANIFEST_FILE
"
* Build datetime:
${
BUILD_TIMESTAMP
}
* Docker image:
${
DOCKER_REPO
}
:
${
GIT_SHA_TAG
}
* Docker image size:
$(
docker images
${
IMAGE_NAME
}
--format
"{{.Size}}"
)
* Git commit SHA: [
${
GITHUB_SHA
}
](https://github.com/jupyter/docker-stacks/commit/
${
GITHUB_SHA
}
)
* Git commit message:
\`\`\`
${
COMMIT_MSG
}
\`\`\`
## Python Packages
\`\`\`
$(
docker run
--rm
${
IMAGE_NAME
}
python
--version
)
\`\`\`
\`\`\`
$(
docker run
--rm
${
IMAGE_NAME
}
conda info
)
\`\`\`
\`\`\`
$(
docker run
--rm
${
IMAGE_NAME
}
conda list
)
\`\`\`
## Apt Packages
\`\`\`
$(
docker run
--rm
${
IMAGE_NAME
}
apt list
--installed
)
\`\`\`
EOF
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment