spark-submit ready docker container for evaluation purposes
208
Docker container with python and spark
This container ist ready for your spark-submit. It sports a running spark master and worker.
. set-env.sh
docker build -t ${SPARK_PYTHON_IMAGE} .
./shell.sh
After calling this command you can run a 'spark-submit' command:
lprager@mycomputer:~/work/spark/spark-python$ ./shell.sh
starting org.apache.spark.deploy.master.Master, logging to /spark-2.4.4-bin-hadoop2.7/logs/spark--org.apache.spark.deploy.master.Master-1-debian.out
starting org.apache.spark.deploy.worker.Worker, logging to /spark-2.4.4-bin-hadoop2.7/logs/spark--org.apache.spark.deploy.worker.Worker-1-debian.out
example:
spark-submit --master spark://debian:7077 /spark-2.4.4-bin-hadoop2.7/examples/src/main/python/pi.py
root@debian:/my_project# spark-submit --master spark://debian:7077 /spark-2.4.4-bin-hadoop2.7/examples/src/main/python/pi.py
19/10/29 16:29:52 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
19/10/29 16:29:53 INFO SparkContext: Running Spark version 2.4.4
19/10/29 16:29:53 INFO SparkContext: Submitted application: PythonPi
.
.
.
.
with the following shortcut in your .bashrc you are able to start this container by typing 'sp'
sp() {
docker run \
-ti --rm \
--hostname debian \
-v $(pwd)/:/my_project/ \
ludwigprager/spark-python
}
Content type
Image
Digest
Size
921.5 MB
Last updated
almost 7 years ago
docker pull ludwigprager/spark-python