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
568708d2
Commit
568708d2
authored
Jun 19, 2020
by
Darek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrading Spark to 3.0, removing Toree
parent
da246268
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
107 deletions
+9
-107
Makefile
Makefile
+1
-1
all-spark-notebook/Dockerfile
all-spark-notebook/Dockerfile
+0
-10
all-spark-notebook/test/data/local_toree.ipynb
all-spark-notebook/test/data/local_toree.ipynb
+0
-89
all-spark-notebook/test/test_spark_notebooks.py
all-spark-notebook/test/test_spark_notebooks.py
+1
-1
pyspark-notebook/Dockerfile
pyspark-notebook/Dockerfile
+7
-6
No files found.
Makefile
View file @
568708d2
...
...
@@ -88,7 +88,7 @@ lint-build-test-all: $(foreach I,$(ALL_IMAGES),lint/$(I) arch_patch/$(I) build/$
lint-install
:
##
install hadolint
@
echo
"Installing hadolint at
$(HADOLINT)
..."
@
curl
-sL
-o
$(HADOLINT)
"https://github.com/hadolint/hadolint/releases/download/v1.1
7.6
/hadolint-
$(
shell
uname -s
)
-
$(
shell
uname -m
)
"
@
curl
-sL
-o
$(HADOLINT)
"https://github.com/hadolint/hadolint/releases/download/v1.1
8.0
/hadolint-
$(
shell
uname -s
)
-
$(
shell
uname -m
)
"
@
chmod
700
$(HADOLINT)
@
echo
"Installation done!"
@
$(HADOLINT)
--version
...
...
all-spark-notebook/Dockerfile
View file @
568708d2
...
...
@@ -33,16 +33,6 @@ RUN conda install --quiet --yes \
fix-permissions
"
${
CONDA_DIR
}
"
&&
\
fix-permissions
"/home/
${
NB_USER
}
"
# Apache Toree kernel
# hadolint ignore=DL3013
RUN
pip
install
--no-cache-dir
\
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"
&&
\
fix-permissions
"
${
CONDA_DIR
}
"
&&
\
fix-permissions
"/home/
${
NB_USER
}
"
# Spylon-kernel
RUN
conda
install
--quiet
--yes
'spylon-kernel=0.4*'
&&
\
conda clean
--all
-f
-y
&&
\
...
...
all-spark-notebook/test/data/local_toree.ipynb
deleted
100644 → 0
View file @
da246268
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Waiting for a Spark session to start..."
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"spark://master:7077\n"
]
}
],
"source": [
"// should print the value of --master in the kernel spec\n",
"println(sc.master)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Waiting for a Spark session to start..."
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"rdd = ParallelCollectionRDD[0] at parallelize at <console>:28\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"5050.0"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"// Sum of the first 100 whole numbers\n",
"val rdd = sc.parallelize(0 to 100)\n",
"rdd.sum()\n",
"// 5050"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Apache Toree - Scala",
"language": "scala",
"name": "apache_toree_scala"
},
"language_info": {
"codemirror_mode": "text/x-scala",
"file_extension": ".scala",
"mimetype": "text/x-scala",
"name": "scala",
"pygments_lexer": "scala",
"version": "2.11.12"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
\ No newline at end of file
all-spark-notebook/test/test_spark_notebooks.py
View file @
568708d2
...
...
@@ -12,7 +12,7 @@ LOGGER = logging.getLogger(__name__)
@
pytest
.
mark
.
parametrize
(
"test_file"
,
# TODO: add local_sparklyr
[
"local_pyspark"
,
"local_spylon"
,
"local_
toree"
,
"local_
sparkR"
],
[
"local_pyspark"
,
"local_spylon"
,
"local_sparkR"
],
)
def
test_nbconvert
(
container
,
test_file
):
"""Check if Spark notebooks can be executed"""
...
...
pyspark-notebook/Dockerfile
View file @
568708d2
...
...
@@ -11,19 +11,20 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
USER
root
# Spark dependencies
ENV
APACHE_SPARK_VERSION=
2.4.5
\
HADOOP_VERSION=
2.7
ENV
APACHE_SPARK_VERSION=
3.0.0
\
HADOOP_VERSION=
3.2
RUN
apt-get
-y
update
&&
\
apt-get
install
--no-install-recommends
-y
openjdk-
8
-jre-headless ca-certificates-java
&&
\
apt-get
install
--no-install-recommends
-y
openjdk-
11
-jre-headless ca-certificates-java
&&
\
rm
-rf
/var/lib/apt/lists/
*
# Using the preferred mirror to download Spark
WORKDIR
/tmp
# hadolint ignore=SC2046
RUN
wget
-q
$(
wget
-qO-
https://www.apache.org/dyn/closer.lua/spark/spark-
${
APACHE_SPARK_VERSION
}
/spark-
${
APACHE_SPARK_VERSION
}
-bin-hadoop
${
HADOOP_VERSION
}
.tgz
\?
as_json |
\
python
-c
"import sys, json; content=json.load(sys.stdin); print(content['preferred']+content['path_info'])"
)
&&
\
echo
"
2426a20c548bdfc07df288cd1d18d1da6b3189d0b78dee76fa034c52a4e02895f0ad460720c526f163ba63a17efae4764c46a1cd8f9b04c60f9937a554db85d2
*spark-
${
APACHE_SPARK_VERSION
}
-bin-hadoop
${
HADOOP_VERSION
}
.tgz"
|
sha512sum
-c
-
&&
\
echo
"
BFE45406C67CC4AE00411AD18CC438F51E7D4B6F14EB61E7BF6B5450897C2E8D3AB020152657C0239F253735C263512FFABF538AC5B9FFFA38B8295736A9C387
*spark-
${
APACHE_SPARK_VERSION
}
-bin-hadoop
${
HADOOP_VERSION
}
.tgz"
|
sha512sum
-c
-
&&
\
tar
xzf
"spark-
${
APACHE_SPARK_VERSION
}
-bin-hadoop
${
HADOOP_VERSION
}
.tgz"
-C
/usr/local
--owner
root
--group
root
--no-same-owner
&&
\
rm
"spark-
${
APACHE_SPARK_VERSION
}
-bin-hadoop
${
HADOOP_VERSION
}
.tgz"
...
...
@@ -32,7 +33,7 @@ RUN ln -s "spark-${APACHE_SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}" spark
# Configure Spark
ENV
SPARK_HOME=/usr/local/spark
ENV
PYTHONPATH=$SPARK_HOME/python:$SPARK_HOME/python/lib/py4j-0.10.
7
-src.zip \
ENV
PYTHONPATH=$SPARK_HOME/python:$SPARK_HOME/python/lib/py4j-0.10.
9
-src.zip \
SPARK_OPTS="--driver-java-options=-Xms1024M --driver-java-options=-Xmx4096M --driver-java-options=-Dlog4j.logLevel=info" \
PATH=$PATH:$SPARK_HOME/bin
...
...
@@ -44,4 +45,4 @@ RUN conda install --quiet -y 'pyarrow' && \
fix-permissions
"
${
CONDA_DIR
}
"
&&
\
fix-permissions
"/home/
${
NB_USER
}
"
WORKDIR
$HOME
WORKDIR
$HOME
\ 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