Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions to use the docker and make wheels without Travis #73

Open
AbdealiLoKo opened this issue Jun 18, 2016 · 14 comments
Open

Instructions to use the docker and make wheels without Travis #73

AbdealiLoKo opened this issue Jun 18, 2016 · 14 comments

Comments

@AbdealiLoKo
Copy link

I saw https://github.com/pypa/python-manylinux-demo which is neat.
But it would also be nice to have instructions that I can simply run on my computer to create the wheels.

Something like:

Step 1: Install docker from the instructions at https://docs.docker.com/engine/installation/
Step 2: Pull the docker image: docker pull quay.io/pypa/manylinux1_x86_64 (For 64bit)
And so on ...

The Travis build example at https://github.com/pypa/python-manylinux-demo isn't as helpful in case I want to do it locally.

@AbdealiLoKo AbdealiLoKo changed the title Instructions to use the docker and make wheels Instructions to use the docker and make wheels without Travis Jun 18, 2016
@techtonik
Copy link

From what I can see:

  1. Pull docker image for your architecture

     docker pull quay.io/pypa/manylinux1_x86_64
     # or docker pull quay.io/pypa/manylinux1_i686
    

@techtonik
Copy link

  1. Run it

    docker run -it -v $(pwd):/io quay.io/pypa/manylinux1_x86_64

  2. Then in your wheelhouse/ directory there will be wheel

@riddell-stan
Copy link

Here's my version, expanding on @techtonik's a bit:

docker run -it -v $(pwd):/io quay.io/pypa/manylinux1_x86_64
# following, roughly, https://github.com/pypa/python-manylinux-demo/blob/master/travis/build-wheels.sh
PYBIN=/opt/python/cp36-cp36m/bin
for whl in wheelhouse/*.whl; do
    auditwheel repair "$whl" -w /io/wheelhouse/
done
cp wheelhouse/*.whl /io/wheelhouse/

Lots of wheels, including the desired one, will be in $(pwd)/wheelhouse.

@gfairchild
Copy link

I've followed the instructions so far:

docker pull quay.io/pypa/manylinux1_x86_64
docker run -it -v $(pwd):/io quay.io/pypa/manylinux1_x86_64

But I don't see a wheelhouse directory that you guys seem to have when I'm in the container. Is there something I need to do first to create the directory?

@riddell-stan
Copy link

riddell-stan commented Jan 7, 2019 via email

@gfairchild
Copy link

gfairchild commented Jan 7, 2019

But the script you posted above expects *.whl files to already exist in /wheelhouse when logging into the Docker container:

for whl in wheelhouse/*.whl; do
    auditwheel repair "$whl" -w /io/wheelhouse/
done

How do those files get created?

@gfairchild
Copy link

Ok, I think I figured it out. From https://github.com/pypa/python-manylinux-demo/blob/master/travis/build-wheels.sh, this is key:

for PYBIN in /opt/python/*/bin; do
    "${PYBIN}/pip" wheel /io/ -w wheelhouse/
done

@cdietschrun
Copy link

This process is still unclear to me. I have a repository of Python code I need to build, I'm doing a
docker run -it -v $(pwd):/io quay.io/pypa/manylinux1_x86_64

but I don't see anything inside /io. What am I missing?

@matthew-brett
Copy link
Contributor

I think you'll find that starts up the container only for it close immediately. I think you want something like this:

docker run --rm -it -v $(pwd):/io quay.io/pypa/manylinux1_x86_64 /bin/bash

This will drop you into the container, in the bash shell, and you will be able to see /io.

@cdietschrun
Copy link

I've run that and other flavors, and io is still empty.

@cdietschrun
Copy link

Both on x86_64 and i686 versions of the container

@cdietschrun
Copy link

To be explicit, I'm running on Powershell in Windows and have tried with pwd:/io, C:\Users\me\source\repo:/io, /c/Users/me/source/repo etc and all aren't populating io for me

@cdietschrun
Copy link

Looks like it's just some Windows issue on my setup with -v

@matthew-brett
Copy link
Contributor

Ah - sorry - I haven't tried to use Linux containers on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants