Installing SoSTrades platform

You will need approximately 10GB of disk space to install the platform.

Clone sostrades-dev-tools

  • select or create the base folder you want to install in and open a command prompt in it
    You need the path to this folder to have no spaces in it, and be writable for you and the installation scripts you will launch.
    cd <my-installation-folder-path>

  • clone sostrades-dev-tools in it
    git clone https://github.com/os-climate/sostrades-dev-tools

Install the platform

You might see some error messages concerning instalation of PETSC library, which you can ignore :
PETSC is a library for big matrix resolution on parallel super-computers - which you laptop is not anyway :-)

  • move in the sostrades-dev-tools that was just created
    cd sostrades-dev-tools

  • run the PrepDevEnv.py script from there using your Python3.9.13 executable
    to create the development environment
    <path_to_python_3.9_executable> scripts\PrepareDevEnv.py

Create and activate a Python virtual environment

  • run the PrepareVenv.py script using your Python3.9.13 executable
    to create a specific python virtual environment
    <path_to_python_3.9_executable> scripts\PrepareVEnv.py

  • activate the virtual environment
    .\.venv\Scripts\activate
    You should see a (.venv) appear at the beginning of yout DOS prompt From there you can just inivoke python and in this virtual environment your python3.9 executable used to create the virtual environment will be used

Every time you want to work with SoSTrades to develop or use the platform,
activate this virtual environment first by reruning this .\.venv\Scripts\activate command

Configure and initialize the platform

We now directly use pythoninstead of <path_to_python_3.9_executable> as we are in the proper virtual environment

  • run the Configuration.py script (always from sos-trades-dev folder as previously)
    python scripts\Configuration.py

  • run the NodeInstallation.py script to install NVS local webserver capability
    python scripts\NodeInstallation.py
    At the end of the script it will ask you if you want to install NVS to build the web gui : answer yes

  • run the CreateUser.py script to create a local user account for you
    python scripts\CreateUser.py
    The script will ask you to input some information (user, name, last name and e-mail) : leaving any of these fields empty will result in the script crashing, at least a character is required.

    The user you entered will need to be used when accessing the platform
    The password you will need to connect is in a file located in
    sostrades-dev-tools\platform\sostrades-webapi\sos_trades_api\secret\
    You should keep both :-)

  • run the UpdateOntology.py script to initialize the ontology of parameters, models and processes :
    python scripts\UpdateOntology.py