IBM / dse-do-dashboard

Plotly/Dash dashboard for Decision Optimization projects in IBM Cloud Pak for Data
Apache License 2.0
4 stars 3 forks source link

Use a script to start the dasboard in CPD #16

Closed victorterpstra closed 2 years ago

victorterpstra commented 2 years ago

Use a script to start the dashboard from the terminal root.

Avoids having to copy and paste:

cd dashboard/ready_mix/
python ready_mix_index.py

Is it possible to define and run a script in the CPD terminal?

victorterpstra commented 2 years ago

To use a shell script:

  1. Make a file with a .sh extension, e.g. run_my_dashboard.sh
  2. Start the file with #!/bin/bash as the first line. For instance:
    #!/bin/bash  
    echo "Run the FruitDistribution dashboard"  
    PYTHONPATH=$PYTHONPATH:/userfs/FruitDistribution
    cd FruitDistribution/dashboard/
    python fruit_index.py
  3. Run the file from a terminal by using: bash run_my_dashboard.sh