The OptServer is a tool for submitting and executing MOSEK optimizations remotely. This Docker image sets up the simplest stand-alone OptServer container with latest MOSEK version and with all dependencies installed internally.
Prepare a folder containing this Dockerfile and a MOSEK license file:
Dockerfile
optserver.conf
start.sh
mosek.lic
(You can quickly get a trial license file from https://www.mosek.com/try/). Inside that folder execute
docker build -t optserver-demo .
docker run -p 30080:30080 optserver-demo
If all went well now you have a demo instance of the MOSEK OptServer accessible via:
http://your.machine.name:30080
To optimize remotely provide that address in your MOSEK code following instructions in your interface manual. Assuming MOSEK 9.2+:
- Optimizer API: call
putoptserverhost
see C, Python, C#, Java - Fusion API: call
M.optserverHost
, see C++, Python, C#, Java - Command line:
mosek -optserv http://your.machine.name:30080 filename
- MATLAB: see here or see here
It is assumed that you are using the same MOSEK version in the client as on the OptServer, which, if using this Dockerfile
, is the last stable version (the first two numbers major.minor
matter). Otherwise modify the file to install MOSEK versions other than latest
.
To see if the server works open
http://your.machine.name:30080/api/v1/version
To try the web interface open
http://your.machine.name:30080
in a Web browser. Log in with user admin
, password admin
.
- If you attach in interactive mode you can start/stop the OptServer using the scripts provided and adjust configuration.
- Documentation is at https://docs.mosek.com/latest/opt-server/index.html
- If you don't provide a license file, comment out the
COPY
command in the dockerfile and you can still try the web interface, but without being able to actually optimize anything. - Contact
support@mosek.com
in case of questions.