virtual environments

This commit is contained in:
Wim Pomp
2025-03-26 16:24:45 +01:00
parent 46ead90ce2
commit fdd80ad956
5 changed files with 53 additions and 35 deletions

View File

@@ -2,21 +2,30 @@
Start proxied matlab instances from a webpage using Nginx.
## Preequisites
## Prerequisites
Linux with Matlab and Python3
## Installation
make matlabhub/config.py:
edit matlabhub/config.py:
license_file: 'path_to_license.lic'
port_range: [10000, 65536]
matlab-proxy-app: '/opt/matlabhub/venv/bin/matlab-proxy-app' # path to matlab-proxy-app in venv
edit ExecStart to point to gunicorn in python venv in matlab.service:
ExecStart=/opt/matlabhub/venv/bin/gunicorn --bind unix:/tmp/matlabhub.sock matlabhub.app:app
install:
sudo apt install nginx screen
sudo pip install matlabhub
sudo apt install nginx screen xvfb
curl -LsSf https://astral.sh/uv/install.sh | sh
. .bashrc
uv venv venv --python 3.11
. venv/bin/activate
pip install matlabhub
sudo cp matlab /etc/nginx/sites-available/
sudo ln -s /etc/nginx/sites-available/matlab /etc/nginx/sites-enabled/matlab
sudo cp matlab.service /lib/systemd/system/