Språkbanken Tal's Python resource image. Provides CPython 3.12.13 built from
source and a curated set of Python packages, on top of
sprakbankental/os-ubuntu.
This is a resource cache image: its primary purpose is to supply Python
and packages to downstream images via COPY --from=. It can also be run
directly.
GPU exception: SBTal GPU machines run pinned Nvidia-optimised containers
(nvcr.io/nvidia/pytorch) rather than standard SBTal runtime containers.
This image is not used on GPU machines. GPU-specific Python environments are
managed through the Nvidia container stack and are outside the scope of the
oci-basic cascade.
/opt/python/usr/bin/python3 and /usr/bin/python3.12 symlinks/usr/bin/pip3 symlinkTwo groups of packages are installed on top of CPython.
Provides librosa and its full transitive closure (16 packages):
pycparser 3.0, cffi 2.0.0certifi 2026.4.22, idna 3.13, urllib3 2.6.3, requests 2.33.1platformdirs 4.9.6, audioread 3.1.0, decorator 5.2.1lazy-loader 0.5, msgpack 1.1.2, soxr 1.0.0typing-extensions 4.15.0, pooch 1.9.0soundfile 0.13.1, librosa 0.11.0Provides numpy, scipy, pandas, scikit-learn, matplotlib,
umap-learn, and mlxtend with their dependencies (24 packages):
numpy 2.4.4, scipy 1.17.1pandas 3.0.2, pyarrow 24.0.0joblib 1.5.3, threadpoolctl 3.6.0, scikit-learn 1.8.0contourpy 1.3.3, cycler 0.12.1, fonttools 4.62.1, kiwisolver 1.5.0,
pillow 12.2.0, pyparsing 3.3.2, packaging 26.2, matplotlib 3.10.9kneed 0.8.6llvmlite 0.47.0, numba 0.65.1, pynndescent 0.6.0, umap-learn 0.5.12mlxtend 0.24.0six 1.17.0, python-dateutil 2.9.0.post0, tqdm 4.67.3rpy2 3.6.7 — Python interface to R; compiles C extensions against libR.so
supplied by sprakbankental/os-ubuntu.All package versions are pinned. To inspect them:
show-sbt-env versions
Three package versions are hard constraints. They must not be changed without a deliberate decision and full regression testing of downstream fixtures:
| Package | Version | Reason |
|---|---|---|
scikit-learn | 1.8.0 | Cluster assignments and model outputs in downstream fixtures are tied to this version. Upgrading may silently change numeric results. |
umap-learn | 0.5.12 | UMAP embeddings are non-deterministic across versions even with a fixed random seed. Fixture data requires full regeneration on any version change. |
mlxtend | 0.24.0 | Association rule fixtures depend on mlxtend's internal computation. Output format and numeric values may shift across versions. |
ARG OCI_BASIC_VERSION=stable
FROM sprakbankental/python:${OCI_BASIC_VERSION}-aggr AS aggr-python
FROM sprakbankental/os-ubuntu:${OCI_BASIC_VERSION} AS prod-env
# ...
FROM prod-env AS prod
RUN --mount=type=bind,from=aggr-python,source=/artifacts,target=/artifacts \
cp -a /artifacts/. /
The -aggr tag carries the artifact tree only (no OS layer). Use it as the
source for COPY --from= or bind-mount operations.
docker run --rm sprakbankental/python:stable python3 --version
docker run --rm sprakbankental/python:stable python3 -c "import librosa; print(librosa.__version__)"
Follows the same tag scheme as sprakbankental/os-ubuntu. See that image for
the full tag reference.
Each version publishes two targets:
| Tag suffix | Contents |
|---|---|
| (none) | Full runnable image (runtime stage) |
-aggr | Artifact tree only; use as a COPY --from= source |
rpy2 3.6.7 — Python–R bridge; installed in prep-r-bridge.
Requires libR.so from sprakbankental/os-ubuntu (also new in v1.6.3).sprakbankental/python wired into sprakbankental/os assembly image.sprakbankental/python image added to the cascade./opt/python.librosa 0.11.0 and closure (16 packages).numpy 2.4.4, scipy 1.17.1, scikit-learn 1.8.0,
umap-learn 0.5.12, mlxtend 0.24.0, matplotlib 3.10.9,
numba 0.65.1 / llvmlite 0.47.0 and closure (24 packages).A future version will split the -aggr tag into two tiers:
sprakbankental/python — CPython and audio packages onlysprakbankental/python-ml — inherits python, adds the scientific and ML
packagesThis will allow lightweight downstream images (such as ASR services that need only audio processing) to avoid pulling the full ML stack.
The hooks/ directory is present and follows the standard SBTal pattern.
Each hook script sources launch_shared with its own name as the first
argument; launch_shared then finds and sources the shared version of the
hook. The hook set is identical across all oci-basic runtime images.
Copyright 2022–2026 Språkbanken Tal, Department of Speech, Music and Hearing, KTH Royal Institute of Technology.
Licensed under the Apache License 2.0.
Part of the oci-basic image family.
Content type
Image
Digest
sha256:307d89655…
Size
630.1 MB
Last updated
5 months ago
docker pull sprakbankental/python