diff --git a/.github/workflows/prebuilt_docker_image.yml b/.github/workflows/prebuilt_docker_image.yml deleted file mode 100644 index f499cb50c..000000000 --- a/.github/workflows/prebuilt_docker_image.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: prebuilt-docker-image -on: - release: - types: [published] -env: - GHCR_REGISTRY: ghcr.io - IMAGE_NAME: pyodide/pyodide - PYODIDE_ENV_VERSION: 20221102-chrome107-firefox106 -jobs: - build_docker: - runs-on: ubuntu-latest - environment: Docker - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - id: builder - with: - driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=-1 - - name: Log into Docker Hub registry - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@v3 - with: - images: ${{ env.IMAGE_NAME }} - - name: Build and push Docker image to Docker Hub - id: build - uses: docker/build-push-action@v2 - with: - file: ./Dockerfile-prebuilt - push: true - build-args: | - VERSION=${{ env.PYODIDE_ENV_VERSION }} - tags: ${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }} - labels: ${{ steps.meta.outputs.labels }} - builder: ${{ steps.builder.outputs.name }} - - name: Image digest - run: echo ${{ steps.build.outputs.digest }} - build_ghcr: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - id: builder - with: - driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=-1 - - name: Log into registry ${{ env.GHCR_REGISTRY }} - uses: docker/login-action@v1 - with: - registry: ${{ env.GHCR_REGISTRY }} - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@v3 - with: - images: ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Build and push Docker image to ${{ env.GHCR_REGISTRY }} - id: build - uses: docker/build-push-action@v2 - with: - file: ./Dockerfile-prebuilt - push: true - build-args: | - VERSION=${{ env.PYODIDE_ENV_VERSION }} - tags: ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }} - labels: ${{ steps.meta.outputs.labels }} - builder: ${{ steps.builder.outputs.name }} - - name: Image digest - run: echo ${{ steps.build.outputs.digest }} diff --git a/Dockerfile-prebuilt b/Dockerfile-prebuilt deleted file mode 100644 index fbc8206b1..000000000 --- a/Dockerfile-prebuilt +++ /dev/null @@ -1,14 +0,0 @@ -ARG VERSION - -FROM pyodide/pyodide-env:${VERSION} - -USER root - -ENV EMSDK_NUM_CORES=4 EMCC_CORES=4 PYODIDE_JOBS=4 - -COPY . pyodide - -# the rm at the end deletes the build results such that the resulting image can still be used for building pyodide -# from source (including partial and customized builds). Due to the previous run of make, builds -# executed with this image will be much faster than the ones executed with pyodide-env -RUN cd pyodide && PYODIDE_PACKAGES='*' make && rm -r ./dist diff --git a/docs/development/building-from-sources.md b/docs/development/building-from-sources.md index 50c11593b..7912ed60c 100644 --- a/docs/development/building-from-sources.md +++ b/docs/development/building-from-sources.md @@ -24,12 +24,7 @@ to create a Linux build environment. We provide a Debian-based Docker image ([`pyodide/pyodide-env`](https://hub.docker.com/r/pyodide/pyodide-env)) on Docker Hub with the dependencies already installed to make it easier to build -Pyodide. On top of that we provide -a pre-built image -([`pyodide/pyodide`](https://hub.docker.com/r/pyodide/pyodide)) which can be -used for fast custom and partial builds. Note that building from the non -pre-built Docker image is _very_ slow on Mac, building on the host machine -is preferred if at all possible. +Pyodide. ```{note} These Docker images are also available from the Github packages at @@ -38,7 +33,7 @@ These Docker images are also available from the Github packages at 1. Install Docker -2. From a git checkout of Pyodide, run `./run_docker` or `./run_docker --pre-built` +2. From a git checkout of Pyodide, run `./run_docker` 3. Run `make` to build. diff --git a/docs/development/new-packages.md b/docs/development/new-packages.md index a3319f485..bfeac6981 100644 --- a/docs/development/new-packages.md +++ b/docs/development/new-packages.md @@ -110,7 +110,7 @@ cd pyodide If you'd like to use a Docker container, you can now run this command: ```bash -./run_docker --pre-built +./run_docker ``` This will mount the current working directory as `/src` within the container. diff --git a/docs/project/changelog.md b/docs/project/changelog.md index f072f0358..840514c91 100644 --- a/docs/project/changelog.md +++ b/docs/project/changelog.md @@ -17,6 +17,14 @@ substitutions: - `pyodide-cdn2.iodide.io` is not available anymore. Please use `https://cdn.jsdelivr.net/pyodide` instead. {pr}`3150`. +- {{ Breaking }} We now don't publish pre-built Pyodide docker images + anymore. Note that `./run_docker --pre-built` was not working for a while + and it was actually equivalent to `./run_docker`. If you need to build a + single Python wheel out of tree, you can use the `pyodide build` command + instead. See [our blog post](https://blog.pyodide.org/posts/0.21-release/#building-binary-wheels-for-pyodide) + for more information. + {pr}`3342`. + - {{ Enhancement }} Added a system for making Pyodide virtual environments. This is for testing out of tree builds. For more information, see [the documentation](https://pyodide.org/en/stable/development/out-of-tree.html). diff --git a/run_docker b/run_docker index d667a0d66..bae56d68c 100755 --- a/run_docker +++ b/run_docker @@ -2,7 +2,6 @@ PYODIDE_IMAGE_REPO="pyodide" PYODIDE_IMAGE_TAG="20221102-chrome107-firefox106" -PYODIDE_PREBUILT_IMAGE_TAG="0.21.0" DEFAULT_PYODIDE_DOCKER_IMAGE="${PYODIDE_IMAGE_REPO}/pyodide-env:${PYODIDE_IMAGE_TAG}" DEFAULT_PYODIDE_SYSTEM_PORT="none" DOCKER_COMMAND="/bin/bash" @@ -30,8 +29,6 @@ shell in the container. Options: -h, --help Show this information and exit. - --pre-built Use the prebuilt Pyodide image. - This is ignored if the env var PYODIDE_DOCKER_IMAGE is set. -p, --port System port to which to forward. This is ignored if the env var PYODIDE_SYSTEM_PORT is set. If set to 'none', docker instance will not bind to any port. @@ -57,14 +54,6 @@ do usage exit 0 ;; - --pre-built) - if [[ -n ${PYODIDE_DOCKER_IMAGE} ]]; then - echo "WARNING: will use the env var PYODIDE_DOCKER_IMAGE=${PYODIDE_DOCKER_IMAGE}, - the flag --pre-built has no effect" - fi - DEFAULT_PYODIDE_DOCKER_IMAGE="pyodide/pyodide:${PYODIDE_PREBUILT_IMAGE_TAG}" - shift - ;; -p|--port) if [ "$#" -lt 2 ]; then >&2 echo "port cannot be empty" diff --git a/tools/bump_version.py b/tools/bump_version.py index f51b5771e..792b2c2ea 100755 --- a/tools/bump_version.py +++ b/tools/bump_version.py @@ -54,11 +54,6 @@ PYTHON_TARGETS = [ build_version_pattern('pyodide_version = "{python_version}"'), prerelease=True, ), - Target( - ROOT / "run_docker", - build_version_pattern('PYODIDE_PREBUILT_IMAGE_TAG="{python_version}"'), - prerelease=False, - ), Target( ROOT / "docs/project/about.md", build_version_pattern(r"version\s*=\s*{{{python_version}}}"), @@ -146,7 +141,6 @@ def generate_updated_content( return None # Some files only required to be bumped on core version release. - # For example, we don't deploy prebuilt docker images for dev release. if not target.prerelease: if not is_core_version(new_version): print(f"[*] {file}: Skipped (not targeting a core version)") @@ -212,8 +206,8 @@ def main(): update_queue = [] targets = itertools.chain( - zip(PYTHON_TARGETS, [new_version_py] * len(PYTHON_TARGETS)), - zip(JS_TARGETS, [new_version_js] * len(JS_TARGETS)), + zip(PYTHON_TARGETS, [new_version_py] * len(PYTHON_TARGETS), strict=True), + zip(JS_TARGETS, [new_version_js] * len(JS_TARGETS), strict=True), ) for target, new_version in targets: current_version = parse_current_version(target)