Skip to content

Allow running cibuildwheel inside of a previously configured docker image. #676

@Erotemic

Description

@Erotemic

On my internal gitlab-ci runners docker-inside-docker is disabled. This seems to be causing cibuildwheel to fail.

As a workaround, I would like to be able to use cibuildwheel inside of a base manylinux image. That is, I want to give it the information that it is already inside of a manylinux image like quay.io/pypa/manylinux2010_x86_64, and then I want it to do its thing.

I do something similar in this script, if you are inside of docker image (you have to give it this information), it executes the script, but if you tell it you want to run in docker, then it executes itself inside inside of the docker image.
https://gitlab.kitware.com/computer-vision/kwimage/-/blob/master/run_manylinux_build.sh

And my gitlab yaml explicitly has to call out when I use the base quay.io/pypa/manylinux2010_x86_64 image:
https://gitlab.kitware.com/computer-vision/kwimage/-/blob/master/.gitlab-ci.yml

I was poking around in cibuildwheel.linux, and I see that it loops over several configurations and then executes a block of code in a DockerContainer context manager. If I was to write a PR that refactored that inner part into a function the CLI could invoke directly (where the user likely has to provide some information that the looped settings are currently providing), would that be of interest to the maintainers?

(A lot of the inner loop actually looks like a more sophisticated version of what I'm doing in that shell script, I think it would be nice to have that as a callable function)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions