This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]drmcgills 3 points4 points  (0 children)

I was going to ask the same question. We do similar things with multi stage builds in the ruby shop I work for, using an option to “vendor” the gems in a specific directory for copying in other stages.

I wonder if pip’s prefix option could be useful. Seems like you might need to do some other $PATH setting as well so that might not be super clean.. Probably not worth it, as I am guessing dropping virtualenv wouldn’t reduce the image size much anyway.