Skip to content

Commit bbd2b97

Browse files
authored
Merge branch 'master' into patch-2
2 parents a570f43 + 63bec45 commit bbd2b97

File tree

12 files changed

+171
-72
lines changed

12 files changed

+171
-72
lines changed

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ n-docs-diff: ## number of docs/ files changed since branch from master
6868
n-other-diff: ## number of files outside docs/ changed since branch from master
6969
@git diff --name-only $(DIFF_RANGE) -- ':!docs/' | wc -l | awk '{print $$1}'
7070

71+
run/%: ## run a bash in interactive mode in a stack
72+
docker run -it --rm $(OWNER)/$(notdir $@) $(SHELL)
73+
74+
run-sudo/%: ## run a bash in interactive mode as root in a stack
75+
docker run -it --rm -u root $(OWNER)/$(notdir $@) $(SHELL)
76+
7177
tx-en: ## rebuild en locale strings and push to master (req: GH_TOKEN)
7278
@git config --global user.email "travis@travis-ci.org"
7379
@git config --global user.name "Travis CI"
@@ -82,9 +88,5 @@ tx-en: ## rebuild en locale strings and push to master (req: GH_TOKEN)
8288
@git remote add origin-tx https://$${GH_TOKEN}@github.com/jupyter/docker-stacks.git
8389
@git push -u origin-tx master
8490

85-
86-
test/%: ## run tests against a stack
87-
@TEST_IMAGE="$(OWNER)/$(notdir $@)" pytest test
88-
89-
test/base-notebook: ## test supported options in the base notebook
90-
@TEST_IMAGE="$(OWNER)/$(notdir $@)" pytest test base-notebook/test
91+
test/%: ## run tests against a stack (only common tests or common tests + specific tests)
92+
@if [ ! -d "$(notdir $@)/test" ]; then TEST_IMAGE="$(OWNER)/$(notdir $@)" pytest test; else TEST_IMAGE="$(OWNER)/$(notdir $@)" pytest test $(notdir $@)/test; fi

all-spark-notebook/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ USER $NB_UID
2323

2424
# R packages
2525
RUN conda install --quiet --yes \
26-
'r-base=3.6.1' \
26+
'r-base=3.6.2' \
2727
'r-ggplot2=3.2*' \
28-
'r-irkernel=1.0*' \
29-
'r-rcurl=1.95*' \
30-
'r-sparklyr=1.0*' \
28+
'r-irkernel=1.1*' \
29+
'r-rcurl=1.98*' \
30+
'r-sparklyr=1.1*' \
3131
&& \
3232
conda clean --all -f -y && \
3333
fix-permissions $CONDA_DIR && \

base-notebook/test/test_container_options.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,20 @@ def test_chown_extra(container):
7878
assert '/opt/conda/LICENSE.txt:1010:101' in c.logs(stdout=True).decode('utf-8')
7979

8080

81+
def test_chown_home(container):
82+
"""Container should change the NB_USER home directory owner and
83+
group to the current value of NB_UID and NB_GID."""
84+
c = container.run(
85+
tty=True,
86+
user='root',
87+
environment=['CHOWN_HOME=yes',
88+
'CHOWN_HOME_OPTS=-R',
89+
],
90+
command=['start.sh', 'bash', '-c', 'chown root:root /home/jovyan && ls -alsh /home']
91+
)
92+
assert "Changing ownership of /home/jovyan to 1000:100 with options '-R'" in c.logs(stdout=True).decode('utf-8')
93+
94+
8195
def test_sudo(container):
8296
"""Container should grant passwordless sudo to the default user."""
8397
c = container.run(

conftest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright (c) Jupyter Development Team.
22
# Distributed under the terms of the Modified BSD License.
33
import os
4+
import logging
45

56
import docker
67
import pytest
@@ -10,6 +11,8 @@
1011
from requests.adapters import HTTPAdapter
1112

1213

14+
LOGGER = logging.getLogger(__name__)
15+
1316
@pytest.fixture(scope='session')
1417
def http_client():
1518
"""Requests session with retries and backoff."""
@@ -72,9 +75,10 @@ def run(self, **kwargs):
7275
all_kwargs = {}
7376
all_kwargs.update(self.kwargs)
7477
all_kwargs.update(kwargs)
78+
LOGGER.info(f"Running {self.image_name} with args {all_kwargs} ...")
7579
self.container = self.docker_client.containers.run(self.image_name, **all_kwargs)
7680
return self.container
77-
81+
7882
def remove(self):
7983
"""Kills and removes the tracked docker container."""
8084
if self.container:

datascience-notebook/Dockerfile

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,25 @@ USER $NB_UID
4545

4646
# R packages including IRKernel which gets installed globally.
4747
RUN conda install --quiet --yes \
48-
'r-base=3.6.1' \
48+
'r-base=3.6.2' \
4949
'r-caret=6.0*' \
5050
'r-crayon=1.3*' \
51-
'r-devtools=2.1*' \
52-
'r-forecast=8.7*' \
53-
'r-hexbin=1.27*' \
54-
'r-htmltools=0.3*' \
55-
'r-htmlwidgets=1.3*' \
56-
'r-irkernel=1.0*' \
51+
'r-devtools=2.2*' \
52+
'r-forecast=8.10*' \
53+
'r-hexbin=1.28*' \
54+
'r-htmltools=0.4*' \
55+
'r-htmlwidgets=1.5*' \
56+
'r-irkernel=1.1*' \
5757
'r-nycflights13=1.0*' \
5858
'r-plyr=1.8*' \
5959
'r-randomforest=4.6*' \
60-
'r-rcurl=1.95*' \
60+
'r-rcurl=1.98*' \
6161
'r-reshape2=1.4*' \
62-
'r-rmarkdown=1.14*' \
62+
'r-rmarkdown=2.1*' \
6363
'r-rsqlite=2.1*' \
6464
'r-shiny=1.3*' \
65-
'r-sparklyr=1.0*' \
66-
'r-tidyverse=1.2*' \
67-
'rpy2=2.9*' \
65+
'r-tidyverse=1.3*' \
66+
'rpy2=3.1*' \
6867
&& \
6968
conda clean --all -f -y && \
7069
fix-permissions $CONDA_DIR && \

datascience-notebook/hooks/apply_tags

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Tag the latest build with the short git sha as well as version of key runtimes
5+
# and packages.
6+
GIT_SHA_TAG=${SOURCE_COMMIT:0:12}
7+
docker tag $IMAGE_NAME "$DOCKER_REPO:$GIT_SHA_TAG"
8+
PY_VERSION_TAG="python-$(docker run --rm ${IMAGE_NAME} python --version 2>&1 | awk '{print $2}')"
9+
docker tag $IMAGE_NAME "$DOCKER_REPO:$PY_VERSION_TAG"
10+
R_VERSION_TAG="r-$(docker run --rm -a STDOUT ${IMAGE_NAME} R --version | sed -n 1p | awk '{print $3}')"
11+
docker tag $IMAGE_NAME "$DOCKER_REPO:${R_VERSION_TAG%%\r}"
12+
JULIA_VERSION_TAG="julia-$(docker run --rm -a STDOUT ${IMAGE_NAME} julia --version | awk '{print $3}')"
13+
docker tag $IMAGE_NAME "$DOCKER_REPO:${JULIA_VERSION_TAG%%\r}"
14+
NB_VERSION_TAG="notebook-$(docker run --rm -a STDOUT ${IMAGE_NAME} jupyter-notebook --version | tr -d '\r')"
15+
docker tag $IMAGE_NAME "$DOCKER_REPO:${NB_VERSION_TAG%% }"
16+
LAB_VERSION_TAG="lab-$(docker run --rm -a STDOUT ${IMAGE_NAME} jupyter-lab --version | tr -d '\r')"
17+
docker tag $IMAGE_NAME "$DOCKER_REPO:${LAB_VERSION_TAG%%\r}"
18+
HUB_VERSION_TAG="hub-$(docker run --rm -a STDOUT ${IMAGE_NAME} jupyterhub --version | tr -d '\r')"
19+
docker tag $IMAGE_NAME "$DOCKER_REPO:${HUB_VERSION_TAG%%\r}"

datascience-notebook/hooks/index.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
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})|"
1+
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})|"
22
sed "/|-|/a ${INDEX_ROW}" -i "$INDEX_FILE"

datascience-notebook/hooks/post_push

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/bin/bash
22
set -e
33

4+
# Apply and push all tags
5+
source hooks/apply_tags
6+
docker push $DOCKER_REPO
7+
48
# Tag the latest build with the short git sha. Push the tag in addition
59
# to the "latest" tag already pushed.
610
GIT_SHA_TAG=${SOURCE_COMMIT:0:12}
@@ -48,4 +52,4 @@ set +e
4852
for url in $(echo $NEXT_BUILD_TRIGGERS | sed "s/,/ /g")
4953
do
5054
curl -X POST $url
51-
done
55+
done

docs/locale/pt_BR/LC_MESSAGES/index.po

Lines changed: 69 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,109 @@
11
# SOME DESCRIPTIVE TITLE.
22
# Copyright (C) 2018- Project Jupyter
3-
# This file is distributed under the same license as the docker-stacks package.
4-
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
3+
# This file is distributed under the same license as the docker-stacks
4+
# package.
5+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
56
#
67
# Translators:
7-
# Allan Neri Fernandes da Silva <allan.nerifs@gmail.com>, 2019
8+
# Allan Neri Fernandes da Silva <allan.nerifs@gmail.com>, 2020
89
#
910
#, fuzzy
1011
msgid ""
1112
msgstr ""
1213
"Project-Id-Version: docker-stacks latest\n"
1314
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2019-04-21 17:25-0400\n"
15+
"POT-Creation-Date: 2020-01-20 04:43+0000\n"
1516
"PO-Revision-Date: 2019-04-22 13:45+0000\n"
16-
"Last-Translator: Allan Neri Fernandes da Silva <allan.nerifs@gmail.com>, 2019\n"
17+
"Last-Translator: Allan Neri Fernandes da Silva <allan.nerifs@gmail.com>, 2020\n"
1718
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/project-jupyter/teams/97886/pt_BR/)\n"
1819
"MIME-Version: 1.0\n"
1920
"Content-Type: text/plain; charset=UTF-8\n"
2021
"Content-Transfer-Encoding: 8bit\n"
22+
"Generated-By: Babel 2.8.0\n"
2123
"Language: pt_BR\n"
2224
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
2325

24-
# 85291a2c92d440a089cf156fba58b86a
25-
#: ../../index.rst:32 ../../index.rst:32
26+
# 22f1bd46933144e092bf92e3af4c6f4f
27+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:32
28+
#: 79072cbf86294c09b9313ee07735fb65
2629
msgid "User Guide"
2730
msgstr "Guia de uso"
2831

29-
# e4a3fd32059d4486b6b0f3a6fb5065b5
30-
#: ../../index.rst:42 ../../index.rst:42
32+
# f35d75046f8c42ae8cab58d826154823
33+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:42
34+
#: c9e3b347063f4b528690011606e8d5ea
3135
msgid "Contributor Guide"
3236
msgstr "Guia de contribuição"
3337

34-
# 45de48c8617d4ebe83b7ff7141295836
35-
#: ../../index.rst:53 ../../index.rst:53
38+
# a737afe726cd49c4986d75b7d74eeed3
39+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:54
40+
#: c7b53fa9956546d691788706b3ef5dfc
3641
msgid "Maintainer Guide"
3742
msgstr "Guia de manutenção"
3843

39-
# aa99c4562d8d4cb3abfea375470e8af3
40-
#: ../../index.rst:59 ../../index.rst:59
44+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:60
45+
msgid "Jupyter Discourse Forum"
46+
msgstr "Fórum do Jupyter"
47+
48+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:60
49+
msgid "Jupyter Docker Stacks Issue Tracker"
50+
msgstr "Rastreamento de problemas nos containers Docker"
51+
52+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:60
53+
msgid "Jupyter Website"
54+
msgstr "Website do Jupyter"
55+
56+
# 9cd216fa91ef40bbb957373faaf93732
57+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:60
58+
#: 2789eaad173a43a495ff17fd0e1a1a38
4159
msgid "Getting Help"
4260
msgstr "Obtendo ajuda"
4361

44-
# 76df09037a6147c8a85be8ef14c15532
45-
#: ../../index.rst:2
62+
# a0aa0bcd999c4c5e96cc57fd77780f96
63+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:2
64+
#: 121c8abde123400bbdb190b01441a180
4665
msgid "Jupyter Docker Stacks"
4766
msgstr "Jupyter Docker Stacks"
4867

49-
# b3fb253184e64174b26a2da73f221cc1
50-
#: ../../index.rst:4
68+
# 5d06f458dc524214b2c97e865dd2dc81
69+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:4
70+
#: 6463d955c7724db682f6fa42da6b25a7
5171
msgid ""
5272
"Jupyter Docker Stacks are a set of ready-to-run Docker images containing "
5373
"Jupyter applications and interactive computing tools. You can use a stack "
5474
"image to do any of the following (and more):"
5575
msgstr ""
56-
"Jupyter Docker Stacks são um conjunto de imagens Docker prontas para uso "
76+
"Jupyter Docker Stacks é um conjunto de imagens Docker prontas para uso "
5777
"contendo aplicações Jupyter e ferramentas interativas. Você pode usar uma "
5878
"pilha de imagens para fazer qualquer uma dessas coisas (e muito mais):"
5979

60-
# 8cd55fb113a049e7be445b21084df7ea
61-
#: ../../index.rst:6
80+
# c69f151c806e4cdf9bebda05b06c760e
81+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:6
82+
#: 417a2a71d6bd4afdba0c10d1824afa36
6283
msgid "Start a personal Jupyter Notebook server in a local Docker container"
6384
msgstr "Rodar um servidor Jupyter Notebook em um container Docker local"
6485

65-
# 285fa13bed8547b4af0cfc480adf4861
66-
#: ../../index.rst:7
86+
# b26271409ab743b2a349b3a8ca95233e
87+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:7
88+
#: 318b7b2a1f4644048ce7deb74fc8a2cf
6789
msgid "Run JupyterLab servers for a team using JupyterHub"
68-
msgstr "Rode um servidor JupyterLab para uma equipe usando JupyterHub"
90+
msgstr "Rodar um servidor JupyterLab para uma equipe usando JupyterHub"
6991

70-
# a49d31cedd4946ea98d7a4c720340d84
71-
#: ../../index.rst:8
92+
# 4d60f4325fff4ffcad12703a4b9d6781
93+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:8
94+
#: faebaa8b57f24f52b0873a12b4da2a62
7295
msgid "Write your own project Dockerfile"
7396
msgstr "Escrever seu próprio Dockerfile"
7497

75-
# 0aff0df2e46a44b4bc8070545e83c42c
76-
#: ../../index.rst:11
98+
# 78b0d31eb6e9462888eef92e6a84cdb7
99+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:11
100+
#: 549f043c0b734a61817b2c737ac59d7c
77101
msgid "Quick Start"
78102
msgstr "Guia rápido"
79103

80-
# 3262accd283140058db73005072be200
81-
#: ../../index.rst:13
104+
# d4c0e237dbe74e0d9afbf2b2f0e219c8
105+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:13
106+
#: bc586127ae4b4cbba1d9709841f2135c
82107
msgid ""
83108
"You can try a `recent build of the jupyter/base-notebook image on "
84109
"mybinder.org <https://mybinder.org/v2/gh/jupyter/docker-"
@@ -96,17 +121,19 @@ msgstr ""
96121
":doc:`qual imagem <using/selecting>` usar, e quer iniciar um servidor "
97122
"Jupyter Notebook em um contêiner."
98123

99-
# 9e4094e8de264e20bca0af8f6cf888b7
100-
#: ../../index.rst:15
124+
# 051ed23ef62e41058a7c889604f96035
125+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:15
126+
#: 51538eb1f8d442acaae41b8e69a8704e
101127
msgid ""
102128
"The other pages in this documentation describe additional uses and features "
103129
"in detail."
104130
msgstr ""
105131
"As próximas paginas desta documentação descrevem os usos e as "
106132
"funcionalidades adicionais com mais detalhes"
107133

108-
# 8b75310f2eaa4aac95d9387e0a4db9e8
109-
#: ../../index.rst:17
134+
# e91f3b62a1b54166b966be6d7a4f061e
135+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:17
136+
#: 0c8148b23d704a1699d2812744b20c7c
110137
msgid ""
111138
"**Example 1:** This command pulls the ``jupyter/scipy-notebook`` image "
112139
"tagged ``17aba6048f44`` from Docker Hub if it is not already present on the "
@@ -128,8 +155,9 @@ msgstr ""
128155
" token secreto exibido no console. O contêiner permanece intacto para "
129156
"reinicialização após o termino do servidor.::"
130157

131-
# 9e0229c99f404aceb7e517387ae88365
132-
#: ../../index.rst:21
158+
# e04140e6cd8442f7a6f347d88224f591
159+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:21
160+
#: dcbbce6e5e67473aa32e264e422f334f
133161
msgid ""
134162
"**Example 2:** This command performs the same operations as **Example 1**, "
135163
"but it exposes the server on host port 10000 instead of port 8888. Visiting "
@@ -143,8 +171,9 @@ msgstr ""
143171
" o JupyterLab, onde ``hostname`` é o nome do computador executando o docker "
144172
"e ``token`` é o token secreto exibido no console.::"
145173

146-
# 02c25d3f0abe48348100dd878c243a75
147-
#: ../../index.rst:25
174+
# 1c3229680cf44a5bb2d8450602bfcf7d
175+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:25
176+
#: 449c01c1808b427381502b0d33f4efcb
148177
msgid ""
149178
"**Example 3:** This command pulls the ``jupyter/datascience-notebook`` image"
150179
" tagged ``9b06df75e445`` from Docker Hub if it is not already present on the"
@@ -171,7 +200,8 @@ msgstr ""
171200
"mas os arquivos escritos em ``~work`` do contêiner permanecem intactos no "
172201
"host.::"
173202

174-
# 1bc0c7d54cd343d689362047c0b00122
175-
#: ../../index.rst:30
203+
# 3ac1a41d185844b1b43315a4cc74efc8
204+
#: /home/travis/build/jupyter/docker-stacks/docs/index.rst:30
205+
#: 3e1e8e2674784f5caad20d9c110707c5
176206
msgid "Table of Contents"
177207
msgstr "Índice"

0 commit comments

Comments
 (0)