Summary
Create and ship a derived Docker image that layers a specific Python version on top of ghcr.io/nanvix/toolchain-gcc, to be used as the cross-compilation environment for CPython on Nanvix.
Background
The Nanvix toolchain is migrating from nanvix/toolchain:latest-minimal (Docker Hub) to ghcr.io/nanvix/toolchain-gcc:sha-34a3641 (GHCR). The new GCC image is intentionally minimal — it contains only binutils + gcc + newlib for i686-nanvix.
However, CPython's cross-compilation requires a host Python 3 interpreter (passed via --with-build-python). The old image provided this at /opt/nanvix/bin/python3; the new GCC-only image does not.
Proposal
This repository should own and publish a derived Docker image, e.g.:
FROM ghcr.io/nanvix/toolchain-gcc:sha-34a3641
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-dev \
&& rm -rf /var/lib/apt/lists/*
Published as: ghcr.io/nanvix/toolchain-python:<tag>
Requirements
- Base image:
ghcr.io/nanvix/toolchain-gcc (pinned to a specific tag/SHA)
- Adds: Python 3 (matching or close to the CPython version being cross-compiled)
- Python should be available at a predictable path (e.g.,
/usr/bin/python3)
- Published to GHCR from this repo's CI
Files to Update After Image is Available
Makefile.nanvix — update NANVIX_DOCKER_IMAGE default and BUILD_PYTHON path
.nanvix/config.py — update DOCKER_IMAGE constant
.nanvix/env.json (if present) — update NANVIX_DOCKER_IMAGE field
NANVIX.md — update docker pull instructions
Notes
- The
BUILD_PYTHON path in Makefile.nanvix currently points to /opt/nanvix/bin/python3. After migration, it should point to /usr/bin/python3 (or wherever the derived image installs it).
- This keeps the GCC toolchain image lean for all other repos while giving CPython exactly what it needs.
Summary
Create and ship a derived Docker image that layers a specific Python version on top of
ghcr.io/nanvix/toolchain-gcc, to be used as the cross-compilation environment for CPython on Nanvix.Background
The Nanvix toolchain is migrating from
nanvix/toolchain:latest-minimal(Docker Hub) toghcr.io/nanvix/toolchain-gcc:sha-34a3641(GHCR). The new GCC image is intentionally minimal — it contains only binutils + gcc + newlib fori686-nanvix.However, CPython's cross-compilation requires a host Python 3 interpreter (passed via
--with-build-python). The old image provided this at/opt/nanvix/bin/python3; the new GCC-only image does not.Proposal
This repository should own and publish a derived Docker image, e.g.:
Published as:
ghcr.io/nanvix/toolchain-python:<tag>Requirements
ghcr.io/nanvix/toolchain-gcc(pinned to a specific tag/SHA)/usr/bin/python3)Files to Update After Image is Available
Makefile.nanvix— updateNANVIX_DOCKER_IMAGEdefault andBUILD_PYTHONpath.nanvix/config.py— updateDOCKER_IMAGEconstant.nanvix/env.json(if present) — updateNANVIX_DOCKER_IMAGEfieldNANVIX.md— updatedocker pullinstructionsNotes
BUILD_PYTHONpath inMakefile.nanvixcurrently points to/opt/nanvix/bin/python3. After migration, it should point to/usr/bin/python3(or wherever the derived image installs it).