mirror of https://github.com/pyodide/pyodide.git
Remove pre-built docker image support (#3342)
This commit is contained in:
parent
d48a4f2193
commit
d802fb3fdc
|
@ -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 }}
|
|
@ -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
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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).
|
||||
|
|
11
run_docker
11
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 <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"
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue