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

Add travis-ci pipeline to build python wheels for Linux (PEP513) #264

Merged
merged 9 commits into from
Feb 13, 2019

Conversation

gmagno
Copy link
Contributor

@gmagno gmagno commented Jan 28, 2019

Suggestion to add a travis-ci pipeline to build python wheels for Linux (PEP513). For more context please check issue: #263 .

Just a few notes:

  • A travis account is needed, and the PyPI account details should be passed as environment variables. This can be configured using the web interface and setting: TWINE_USERNAME and TWINE_PASSWORD. Please check the following image.

image

  • The job is currently pulling OpenCL-Headers and OpenCL-ICD-Loader, and building the latter with their latest version. I am not sure this is the desired behavior and should be reviewed.

  • The job is triggered by tagged commits only, to avoid redundant builds.

  • It probably makes sense, at some point, to replace this travis job by a gitlab-ci one as it seems Gitlab is what people are using(?)

Cheers,

@inducer inducer merged commit 83b22ce into inducer:master Feb 13, 2019
@inducer
Copy link
Owner

inducer commented Feb 13, 2019

Thanks for working on this!

@inducer
Copy link
Owner

inducer commented Feb 13, 2019

  • It probably makes sense, at some point, to replace this travis job by a gitlab-ci one as it seems Gitlab is what people are using(?)

Gitlab speaks more easily to the cluster of test GPUs at UIUC. But I do maintain the Github repo as the 'public face' of the project, so I don't mind having Travis on there.

@inducer
Copy link
Owner

inducer commented Feb 13, 2019

The job is currently pulling OpenCL-Headers and OpenCL-ICD-Loader, and building the latter with their latest version. I am not sure this is the desired behavior and should be reviewed.

I think that's OK. New ICD loader + old ICDs is totally fine.

@inducer
Copy link
Owner

inducer commented Feb 13, 2019

Oh wait. We're not shipping the ICD loader.

@inducer
Copy link
Owner

inducer commented Feb 13, 2019

Embarrassingly, I'm not sure I can tell.

# Bundle external shared libraries into the wheels
for whl in wheelhouse/*.whl; do
    auditwheel repair "$whl" -w /io/wheelhouse/
done

This makes it look like we might.

@gmagno
Copy link
Contributor Author

gmagno commented Feb 13, 2019

Yes, it should be bundled by auditwheel.
I have tried this with a different dist package name, for testing purposes, so you can try:

virtualenv .venv -p python3.5
source .venv/bin/activate
pip install pyopencl-gm
ls -l .venv/lib/python3.5/site-packages/pyopencl/.libs/libOpenCL-c0a1ccf3.so.1.2

@inducer
Copy link
Owner

inducer commented Feb 13, 2019

ls -l .venv/lib/python3.5/site-packages/pyopencl/.libs/libOpenCL-c0a1ccf3.so.1.2

OIC. In that case, we should be fine.

FWIW, the first of these builds just succeeded: https://pypi.org/project/pyopencl/2018.2.3/#files

Could you verify that these work for you?

Again, thanks for working on this.

@gmagno
Copy link
Contributor Author

gmagno commented Feb 13, 2019

I just tried a cl.get_platforms() on my Intel GPU and it works great! :)
This is the Dockerfile I am using BTW: https://github.com/gmagno/nb-ocl/blob/master/docker/Dockerfile_igpu

I wonder if the tag version shouldn't be 2019.x.x?

@isuruf
Copy link
Collaborator

isuruf commented Feb 13, 2019

To comply with Khronos' ICD loader's license, the license file has to be shipped with the wheel. Also, that makes the wheel GPL-incompatible. Using ocl-icd loader would fix this.

@inducer
Copy link
Owner

inducer commented Feb 13, 2019

I wonder if the tag version shouldn't be 2019.x.x?

Technically yes, but I wasn't sure that the build was going to work, and I didn't want 2019.1 to be a dud because of that.

To comply with Khronos' ICD loader's license, the license file has to be shipped with the wheel.

Good point, thanks for pointing this out. I've manually deleted the wheels from the package index for the time being until we've addressed this issue. (#269)

@gmagno
Copy link
Contributor Author

gmagno commented Feb 13, 2019

I guess I overlooked the license...
Thanks for the heads-up.

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

Successfully merging this pull request may close these issues.

3 participants