loum/pyjdk
Python3 and a JVM on Ubuntu noble 24.04
2.2K
A vanilla, base Docker image for further install of PySpark. That is, it gives you python3
and a JVM ready for a PySpark install.
If used as a standalone image, it is possible to get a Python REPL as per the following:
docker run --rm -ti loum/pyjdk:latest
latest
Dockerfile
linksPySpark is not installed by default. This is to keep the image size as small as possible. However, the environment is ready to support a PySpark install. loum/pyjdk
can serve as a base image for your larger project. If you only want a quick and simple PySpark REPL, then provide a PySpark version to the BUILD_PYSPARK_VERSION
environment variable:
docker run --rm -ti --name pyjdk --env PYSPARK_VERSION=3.5.3 loum/pyjdk:python3.11-openjdk11
This will dynamically pip
install the PYSPARK_VERSION
into a running container.
To use the container as a standard Python REPL:
docker run --rm -ti --name pyjdk loum/pyjdk:python3.11-openjdk11 python
Running a Python command:
docker run --rm -ti --name pyjdk loum/pyjdk:python3.11-openjdk11 python -c "import sys;print(sys.version)"
To run java
command:
docker run --rm -ti --name pyjdk loum/pyjdk:python3.11-openjdk11 java -version
docker pull loum/pyjdk