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

Redistribute mosek in Drake binary releases #16439

Closed
RussTedrake opened this issue Jan 26, 2022 · 10 comments
Closed

Redistribute mosek in Drake binary releases #16439

RussTedrake opened this issue Jan 26, 2022 · 10 comments
Assignees
Labels
component: distribution Nightly binaries, monthly releases, docker, installation priority: high unused team: kitware

Comments

@RussTedrake
Copy link
Contributor

Related to #10804, but it deserves it own issue for tracking.

Problem: Currently no solver that is available in the Drake binary release supports mixed-integer optimization, which in increasingly important. Mosek is also a superior solver relative to many of the open-source solvers we make available for a number of optimization classes.

Proposed solution: Drake binary packages include the mosek binary; users would still have to provide the mosek license file.

This may involve an agreement w/ Mosek.

@jwnimmer-tri
Copy link
Collaborator

The Mosek EULA section 8 discusses re-hosting. I only spent a few moments reading it, but it seems like there is not a blanket grant for us to redistribute. It does seem like we would need to get some kind of special permission. Or possibly there is a redistribution grant somewhere else, that I've overlooked.

Or possibly we could have a drake "installer" that downloads and installs Mosek, adjacent to a Drake tarball. We might not be able to add it to our Docker or Pip images, though.

The Mosek wheel (https://pypi.org/project/Mosek/#files) for pip install Mosek has the runtime library embedded in it:

  -rwxr-xr-x    324676  24-Jan-2022  09:09:38  mosek/libcilkrts.so.5
  -rwxr-xr-x  27536576  24-Jan-2022  09:09:38  mosek/libmosek64.so.9.3

For pip install drake, we might be able to reference that directly (instead of redistributing our own copy), as a dependency.

The question would be if it's okay (for our taste) for (say) pip install drake==v0.39.0 to have an unconditional dependency on (say) requirements: mosek >= 9.3, < 9.4, or whether it would need to be somehow optional and opted-in at runtime.

In any case, if we could get permission to redistribute the Mosek runtime library (no need for headers) alongside Drake, that would be the easiest way forward. We could include any notices or documentation that were important, as requested.

@jwnimmer-tri
Copy link
Collaborator

@BetsyMcPhail -- Russ is working on the "permission" facet above, and will probably be finished soon. I've added this to "On Deck" in anticipation.

After that's ready, it's over to us to work on the implementation here to make it happen. The plan will be to turn on MOSEK during our Packaging builds (in addition to SNOPT).

I imagine it will be something like this:

  • Ensure that when MOSEK is enabled in the build, that the proper files and notices are installed (if not already), and that any disclaimers we need on the website appear there now.
  • Change all jobs in https://drake-jenkins.csail.mit.edu/view/Packaging/ to say "snopt-mosek-packaging" instead of just "snopt-packaging", and ensure that the drake-ci scripts notice this and correctly enable both SNOPT and MOSEK in the build and its test filters.
    • For the transition, we should probably to add Experimental builds for snopt-mosek-packaging while we test and develop things, without changing or removing any of the other builds.
  • Change the build-wheel script to enable MOSEK and https://drake-jenkins.csail.mit.edu/view/Wheel/ to say "snopt-mosek-release" instead of just "snopt-release".

@RussTedrake
Copy link
Contributor Author

FYI. We now have a fully-executed agreement with Mosek allowing us to redistribute the Mosek binaries with the Drake binaries. Hoorah! @BetsyMcPhail -- Let us please move forward on this.

@jwnimmer-tri
Copy link
Collaborator

I'll sort this into the work queue in the appropriate place. We need to switch to Focal (and related CI work) before we start this.

@jwnimmer-tri jwnimmer-tri added unused team: kitware component: distribution Nightly binaries, monthly releases, docker, installation and removed unused team: manipulation labels Apr 11, 2022
@jwnimmer-tri
Copy link
Collaborator

Ensure that when MOSEK is enabled in the build, that the proper files and notices are installed (if not already), ...

I double-checked our license agreement and ensuing discussions.

The runtime files we need are the two shared libraries we've already installed (libmosek, libcilkrts).

The only documentation files we need are just the two:

  • mosek-eula.pdf
  • LICENSE_CilkPlus

Those seem to be already installed when MOSEK is enabled, but we should double-check in the new CI packaging builds.

... and that any disclaimers we need on the website appear there now.

I still need to publish the new license contract document before we can turn on MOSEK for the nightlies. I'm working on that.

@BetsyMcPhail
Copy link
Contributor

ensure that the drake-ci scripts notice this and correctly enable both SNOPT and MOSEK in the build and its test filters.

From the new linux-focal-unprovisioned-gcc-bazel-experimental-snopt-mosek-packaging job:

Bazel Command: CC=gcc CXX=g++ bazel run --compilation_mode=opt --config=mosek --config=snopt --test_tag_filters=-gurobi //:install -- /opt/drake

So no changes needed to the CI scripts.

@BetsyMcPhail
Copy link
Contributor

A PR to change all "snopt-packaging" jobs to "snopt-mosek-packaging" has been created. It is waiting and ready to coordinate with the other pieces of this issue.

@jwnimmer-tri
Copy link
Collaborator

I still need to publish the new license contract document before we can turn on MOSEK for the nightlies. I'm working on that.

Filed as => #16934. Once that merges, we should be clear to land the PRs that turn on Mosek in our binaries.

@BetsyMcPhail
Copy link
Contributor

Wheel job names in Jenkins have also been updated in the same drake-jenkins-jobs PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: distribution Nightly binaries, monthly releases, docker, installation priority: high unused team: kitware
Development

No branches or pull requests

3 participants