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

Install rust in docker images for building wheels #601

Open
jesper-friis opened this issue Aug 16, 2023 · 1 comment
Open

Install rust in docker images for building wheels #601

jesper-friis opened this issue Aug 16, 2023 · 1 comment

Comments

@jesper-friis
Copy link
Collaborator

Unfortunately pydantic v2 requires rust, cargo and poetry to be available when installing it on manylinux2010 and musllinux_1_1. This means that although DLite now has support for pydantic v2, we cannot test it when building wheels for these platforms. This also means that extra_requirements in python/setup.py cannot be read from requirements_full.txt but has to be specified separately.

To address these issues, we should install rust, cargo and poetry in the docker images we use to build the DLite wheels for manylinux2010 and musllinux_1_1.

Basically we just need to update

.github/docker/Dockerfile-manylinux.template
.github/docker/Dockerfile-musllinux.template

to ensure that rust, cargo and poetry are installed. Unfortunately, it doesn't seem to be that easy... I tested for manylinux2010, but rust and cargo aren't available as yum packages on this platform and the official curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh to work either.

When we somehow have figured out how to install rust and cargo, poetry should be pip installable.

@jesper-friis jesper-friis mentioned this issue Aug 16, 2023
14 tasks
@jesper-friis
Copy link
Collaborator Author

Update: if it is difficult to install rust and cargo on manylinux2010 and musllinux_1_1, an alternative may be to simply require pydantic v1 on these old platforms.

jesper-friis added a commit that referenced this issue Aug 24, 2023
# Description
Closes #517 

Added new requirements file `requirements_full.txt` with all optional
requirements.

Getting rust, cargo and poetry properly installed in the docker images
for building the wheels is followed up in issue #601.

Follow up with issue #602 - Avoid skipping tests when build Python
wheels.

**Remaining things to be done:**
- [x] Fix failing tests
- [x] Make it possible to install dlite with `pip install
DLite-Python[full]` to include all optional dependencies.
- [x] Document how to install DLite with all dependencies included.
- [x] Ensure that tests run if yaml is missing (avoid false CI failures
on this PR before we get everything correctly installed in the docker
containers used for building the wheels. This should not be used to skip
yaml-dependent tests when testing the wheels).
- [ ] Agree on whether to accept this PR or the solution suggested in
issue #603.

## Type of change
- [x] Bug fix & code cleanup
- [ ] New feature
- [ ] Documentation update
- [ ] Test update

## Checklist for the reviewer
This checklist should be used as a help for the reviewer.

- [ ] Is the change limited to one issue?
- [ ] Does this PR close the issue?
- [ ] Is the code easy to read and understand?
- [ ] Do all new feature have an accompanying new test?
- [ ] Has the documentation been updated as necessary?
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

1 participant