Expose a mosek license via a nginx server
Project description
Mosek License Server
Using a nginx image we expose a Mosek license on a server to be accessible from various research machines without sharing the actual license file in the underlying repositories.
This repository serves two purposes. It exposes the server but it is also the home for a little Python package to inject the license into your programs.
We solve a common problem here. Assume $20$ researchers work on $50$ different strategies. Using local copies of the same license file is a tedious exercise as the file needs to get updated once a year. Rather, each strategy would connect to the server to fetch a license using the mosek_license Python package. Once the strategy expires we only need to update the server. No change for the strategies is required.
License server
Copy your license file into folder
Copy the license file you have received (from Mosek) into the license folder. Name it `mosek'.
Start the nginx server
Share the license folder (after you have copied your personal Mosek license into) via
docker run --name mosek -v $PWD/license:/usr/share/nginx/html:ro -p 8080:80 -d nginx
The license will now be exposed via http://localhost:8080
As an alternative you can run the script
./license_server.sh
The mosek_license module
Install via
pip install mosek-license-server
and then
from mosek_license import license
# It's important to upsert the license before you import mosek
license.upsert()
# only now import mosek
import mosek
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mosek_license_server-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0e1356d0f19439d2f74a5e61e49e54a07dfa9efcb1608b9eda7e740db01ca65 |
|
MD5 | 3d78dfef3cdf3fec0c82acaea3b743f5 |
|
BLAKE2b-256 | 297ecb56de12db99964545ca6f17fee78448ff0e3d91ca52cf10b22b0afaf680 |
Hashes for mosek_license_server-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b1e310042cc943289137070cb40eedce83b014540e99f985688b1814d237963 |
|
MD5 | 3512408ae561f66f6f8726acef3ac550 |
|
BLAKE2b-256 | f4484baf8e7ff1683b12d7558985b453e70c95822b7a8dc6d9e3314088c5ed17 |