You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I still can't get it to work with Dazel (which, I see, you forked, too). I even edited the Dazel sources to pass the hardcoded -e BAZEL_WHEEL_CACHE=foo flag to Docker. I think that at some point I got something to work by going straight inside the VM and running Bazel myself. Is it supposed to set the "urls" field in the wheel dictionary in requirements.bzl?
I've been meaning to provide an example how to do this. Actually, I've already stopped using BAZEL_WHEEL_CACHE because it bypasses bazel's repository cache, which makes it re-download wheels all the time. My current setup is such that I have a custom repository rule that generates a file that looks like this:
I haven't had time to clean the "cdn" code to be generic enough to make it part of rules_python. When I get to that, I'd like to remove the BAZEL_WHEEL_CACHE mechanism.
Activity
scele commentedon Jan 29, 2019
It doesn't work with --action_env, since the caching happens inside a repository rule. Try this instead:
therc commentedon Jan 29, 2019
Ah, right. I hadn't tried that because I thought it was too obvious and simple.
therc commentedon Feb 9, 2019
I still can't get it to work with Dazel (which, I see, you forked, too). I even edited the Dazel sources to pass the hardcoded
-e BAZEL_WHEEL_CACHE=fooflag to Docker. I think that at some point I got something to work by going straight inside the VM and running Bazel myself. Is it supposed to set the "urls" field in the wheel dictionary inrequirements.bzl?scele commentedon Feb 12, 2019
I've been meaning to provide an example how to do this. Actually, I've already stopped using
BAZEL_WHEEL_CACHEbecause it bypasses bazel's repository cache, which makes it re-download wheels all the time. My current setup is such that I have a custom repository rule that generates a file that looks like this:Then, I have customized
pip_installto take the URL from the CDN, if available:And in WORKSPACE:
I haven't had time to clean the "cdn" code to be generic enough to make it part of rules_python. When I get to that, I'd like to remove the
BAZEL_WHEEL_CACHEmechanism.scele commentedon Feb 12, 2019
Basically, what I explain above is just a fancy / more complex way to achieve this: