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

Error building docker image #57

Open
japborst opened this issue Dec 6, 2024 · 3 comments
Open

Error building docker image #57

japborst opened this issue Dec 6, 2024 · 3 comments

Comments

@japborst
Copy link

japborst commented Dec 6, 2024

When trying to build a docker image and installing primp (as dependency), I get the following error

12.23   ChefBuildError
12.23
12.23   Backend subprocess exited when trying to invoke build_wheel
12.23
12.23   Running `maturin pep517 build-wheel -i /tmp/tmpok1kf38i/.venv/bin/python --compatibility off`
12.23   💥 maturin failed
12.23     Caused by: Cargo metadata failed. Do you have cargo in your PATH?
12.23     Caused by: No such file or directory (os error 2)
12.23   Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/tmp/tmpok1kf38i/.venv/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
12.23
12.23
12.23   at /usr/local/lib/python3.11/site-packages/poetry/installation/chef.py:164 in _prepare
12.26       160│
12.26       161│                 error = ChefBuildError("\n\n".join(message_parts))
12.26       162│
12.26       163│             if error is not None:
12.26     → 164│                 raise error from None
12.26       165│
12.26       166│             return path
12.26       167│
12.26       168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
12.26
12.26 Note: This error originates from the build backend, and is likely not a problem with poetry but with primp (0.8.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "primp (==0.8.1)"'.
12.26
@deedy5
Copy link
Owner

deedy5 commented Dec 6, 2024

Try to install primp like this in the dockerfile:

RUN pip install --no-use-pep517 primp

@japborst
Copy link
Author

japborst commented Dec 7, 2024

Thanks for the reply @deedy5!

Currently it's being installed through poetry as part of our standard build pipeline. Installing using poetry works fine locally (MacOS), but not in the docker image.

Is there any way to make it pep517 compatible?

@deedy5
Copy link
Owner

deedy5 commented Dec 7, 2024

I don't understand the problem, show me the dockerfile.

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

2 participants