Closed dayeol closed 1 month ago
There is a rule in rules_py that allows you to extract a wheel into a directory, you can use that https://github.com/aspect-build/rules_py/blob/781650cc0913728906160ae778918252e86a008d/py/tests/virtual/django/BUILD.bazel#L7-L11 in combination with tar rule to put contents of a wheel into a layer.
Thank you!
I was able to temporarily fix it by using some init scripts in the image. I will try to unpack the wheel when i get time. I do think some new pkg rule would be great to have though.
Hello,
I have been struggling with this for a while, and still haven't figured out the way. one of my
genrule
will generate a python wheel, that needs to be installed in a container image. (Note that I wasn't able to usepy_wheel
because this is jupyterlab extension with a whole bunch of their custom tools)What I want is just the image that is being build have this custom wheel installed, as if I did the following in my dockerfile.
I believe this
RUN
is still hermetic, but I was not able to figure out what's the best way. I was thinking about usingpkg_tar
, but this wheel has multiple different destinations which will make things so complicated.Should I just bring back
container_run_and_commit
and forget about it?Any advise would be appreciated!