Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    AI-Studio Server

    AI-Studio Server

    estani
    Established Member

    Hi,

    I have downloaded the linux version, unzip and run successfully the login commands. But when I try to run docker-compose (inside the right folder) I get an error message saying: 
    Can't find a suitable configuration file in this directory or any parent. Are you in the right directory?

    Inside the server folder, there are just three files:

    - bst-bme-aistudio-server

    - LICENSE

    - README.md

    What's going on?
    Am I missing a file or should I run a different command?

    13 REPLIES 13

    Somewhere there is an engineer that has a docker-compose.yml that works.  They just need to find that person and share the file.  At this point I don't have a lot of hope.

    Jim...

    BSTRobin
    Community Moderator
    Community Moderator

    Hi all,

    Please refer to the following solution.md file.

    # BST BME AI-Studio Server

    ## Requirements

    - Linux for BST BME AI-Studio Server
    - Running PostgreSQL Server v14.x thet can be accessed from the host running BST BME AI-Studio Server

    ## Setup

    Configuration of BST BME AI-Studio Server is done setting environment variables.
    The following example starts BST BME AI-Studio Server listening on port 8080 and accesses a PostgreSQL database server running on port 5432 on localhost:

    ```bash
    $ PGHOST=127.0.0.1 \
    PGPORT=5432 \
    PGDATABASE=my_existing_db \
    PGUSER=my_existing_pg_user \
    PGPASSWORD=my_secret_passowrd \
    PORT=8080 \
    ./bst-bme-aistudio-server
    ```

    These options can be set as environment variables:
    - PGUSER - (required) The postgres user name. Note that the user needs permissions to create tables in the configured database.
    - PGPASSWORD - (required) The password of the postgres user.
    - PGDATABASE - (required) The name of the postgres database to use.
    - PGHOST - (optional) The hostname (or IP) of the postgres server to use. Only use this option if an external database server is used.
    Default: 127.0.0.1
    - PGPORT - (optional) The port the postgres server is listening on. Only use this Default: 5432
    - PORT - (optional) The port BST BME AI-Studio Server is listening on for HTTP requests.
    Default: 3000
    - LOG_LEVEL - (optional) The log level to use in BST BME AI-Studio Server. Logs are written to stdout/stderr.
    Options: error, warn, info, debug.
    Default: info

    Note that BST BME AI-Studio Server does not restart automatically on process termination. So it is recommended to use a service manager (e.g. systemd) to start and manage the service.

    ## API

    By default the API is exposed on port 3000. So locally the API doc can be accessed at [http://localhost:3000/api/v1/api-docs](http://localhost:3000/api/v1/api-docs).

    BSTRobin
    Community Moderator
    Community Moderator

    Hi all,

    If any feedback, please send it here. Thanks.

    Hi Jim!

    I agree with you, at least, there should be included docker-compose.yml file.

    When I try to run bst-bme-aistudio-server without any configuration, env variables, I get

    $ ./bst-bme-aistudio-server
    Illegal instruction (core dumped)
     

    I tried to setup up everything (db, env variables) manually and I'm getting Illegal instruction (core dumped) error.

    I will write instructions so I hope someone will reporduce it and see is problem in my amd ryzen 5 cpu or virtual box.

    0. Enter in superuser mode

    sudo su

    1. Verify that you have docker installed

    docker --version

    Docker version 24.0.5, build 24.0.5-0ubuntu1~20.04.1

    2. Download postgredb

    docker pull postgres

    3. Set Environment variables

    #  PGHOST=127.0.0.1
    #   PGPORT=5432
    #   PGDATABASE=my_existing_db
    #   PGUSER=my_existing_pg_user
    #    PGPASSWORD=my_secret_passowrd
    #    PORT=8080
     
    4. Verify with echo $variable commad that they exist, like in example below.
    # echo $PGHOST
    127.0.0.1
    # echo $PGPORT
    5432
    # echo $PGDATABASE
    my_existing_db
    # echo $PGUSER
    my_existing_pg_user
    # echo $PGPASSWORD
    my_secret_passowrd
    # echo $PORT
    8080

    5.  Run Postgre Container

    $ docker run -itd \
    -e POSTGRES_HOST=127.0.0.1 \
    -e POSTGRES_USER=my_existing_pg_user \
    -e POSTGRES_PORT=5432 \
    -e POSTGRES_DB=my_existing_db \
    -e POSTGRES_PASSWORD=my_secret_password \
    -p 5432:5432 \
    -v /data:/var/lib/postgresql/data \
    --name postgresql \
    postgres

    6. Verify container is running
    $ docker ps
     
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    1a6401934f34 postgres "docker-entrypoint.s…" About a minute ago Up About a minute 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp postgresql
     
    7. Run bst Bme Studio Server
    $ ./bst-bme-aistudio-server
    Illegal instruction (core dumped)
     
    Could developers be some kind and provide us docker compose yml file and instructions to run it automatically as well.
    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist