Description
Is your feature request related to a problem? Please describe.
Every few months, pydrake
gets smaller as we optimize our build, but libmosek.so
keeps getting bigger. The huge file size of Mosek is pushing us ever closer to PyPI's hosting limits, and is an unnecessary download cost and security hazard for users who don't want to use Mosek.
Describe the solution you'd like
The beautiful https://github.com/yugr/Implib.so tool lets us do lazy loading of shared libraries the first time they are called, instead of only lazy binding. It seems like Mach-O might already have a similar feature built-in.
That should allow us to compile libdrake.so
with load-time-unresolved references to Mosek, that are only resolved upon the first actual call into Mosek (which would be guarded by the MOSEKLM_LICENSE_FILE environment variable already). For our wheel builds, we should able to resolve those loads against the copy of libmosek.so
shipped in https://pypi.org/project/Mosek/, instead of shipping our own copy.
I will continue to investigate, time permitting.
Additional context
This would pave the way to do #10804 likewise.
Metadata
Metadata
Assignees
Type
Projects
Status