forked from simwrapper/simwrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-sandag.sh
More file actions
34 lines (28 loc) · 944 Bytes
/
install-sandag.sh
File metadata and controls
34 lines (28 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
# --------------------------------------------
# SANDAG bash script for installing SimWrapper
# --------------------------------------------
# Prerequisites:
# - Blob storage is mounted using rclone
# - NodeJS 20.x+ installed
# - uv python environment tool installed
# --------------------------------------------
# fail immediately on all errors
set euo pipefail
# build JavaScript code using node (tested on nodejs 20.x, 22.x)
npm ci
npm build
# set up python environment using uv
cd azure-api
uv sync
# patch pytables to work properly with rclone mounted blob filesystem
patch .venv/lib/python3.12/site-packages/tables/utils.py pytables.patch
# copy javascript into static folder
cp -R ../dist/* static/
# that's it! we are ready to run:
# debug mode:
# - uv run OmxServer.py
# Linux:
# - uv run gunicorn --config gunicorn_config.py OmxServer:app
# Windows:
# - uv run waitress-serve --listen=*:4999 OmxServer:app