Server Setup#
If you want to setup a server that displays your pre-analyzed data for other users, you need to use a WSGI server e.g. gunicorn.
Here is example python code that can be used for server setup:
import os
os.environ["RAPDOR_CONFIG_FILE"] = "customConfig.yaml"
from RAPDOR.visualize.appDefinition import app
from RAPDOR.visualize.runApp import get_app_layout
from RAPDOR.datastructures import RAPDORData
app.layout = get_app_layout()
server = app.server
After you set up this startup code in a file called main.py you can run the server via:
Note
If you want to use custom settings, make sure to set the environment variable RAPDOR_CONFIG_FILE
before importing the app.
Else, it wont have an effect.
gunicorn -b 0.0.0.0:8080 main:server
Custom Settings:#
You can change the default settings via a custom config file as specified above. Below you find the default yaml file
that is loaded from the RAPDOR module. Fields are overwritte via using a custom file and setting the global
variable RAPDOR_CONFIG_FILE
.
# The file system backend where data is pickled and the threshold of files stored in there.
backend:
name: "filesystem_backend"
threshold: 200
# If this is enabled the tool will run in display mode and use the file specified underneath as the displayed file.
display:
mode: false
file: 'RAPDOR.json'
# This specifies the maximum selectable kernel range. adjust this if you have a high number of fractions accordingly.
kernel:
max: !!int 7