Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page contains a guide on how to install and use the SAGA Suite (Saga-Server/Enterprise Search UI and Python Bridge) using Docker.

In case you only need one element of the SAGA Suite, then, we've got you covered! Down below this page we have more specific instructions for all 3 different products.

Table of Contents

Tip

For a better understanding of this documentation please review this Docker documentation topics:

Note

This quickstart-guide with Docker provides an easy way to run, test and develop with SAGA, but in order to do a production deployment or expose these services publicly, you will need to do all the changes required, including changing of configurations, creation of certificates, enabling security measures and whatever is needed to production environments.


Pre-requisites

  1. Docker and docker-compose installed
    1. It can be Docker Desktop or just the Engine in a Linux/Unix environment (or in Windows with WSL, we have this guide on how to install Docker via WSL).
  2. Download SAGA-Quickstart.zip
  3. Have an Artifactory account (to be able to download the images from the docker repository).
    1. If you do not have access to Artifactory or do not remember your credentials, please contact the Support Team and they will help you out.


Saga Suite Installation (Saga-Server / ESUI / Python Bridge)

In order to run all elements of the SAGA Suite and Elasticsearch, the saga-quickstart.zip contains the files needed. So, the steps to run are the following:

  1. Unzip the saga-quickstart.zip
  2. Open a Command prompt (CMD/Powershell in Windows, sh/bash in Linux) and login to the docker artifactory repository

    Code Block
    docker login docker.repository.sca.accenture.com

    You will be prompted for your credentials (registered email and password).

    Info

    This step is only required the first time, once you have logged in, Docker will remember the credentials so you do not need to re-run this command.



  3. Execute the quickstart script. 
    1. In windows, you can execute the bat file by clicking on it or inside a Command line.
    2. In linux, you may need first to give execution permissions before running the shell file.

      Code Block
      chmod +x saga-quickstart.sh



    3. Then you will be asked for what SAGA you want to start, because you can select one for vanilla SAGA and another with the Tensorflow model (it is a bigger image, so keep that in mind when running the script).


      Info

      There are two more options within the shell script, in case you need to execute the script using sudo permissions, this happens when docker is not configured properly and requires to use sudo each time a docker command is run.

  4. Wait until all containers have started.
    1. Saga-Server will be deployed to the port 8080.
    2. ESUI to the port 3000.
    3. Python-Bridge to 5000.
    4. And Elasticsearch to 9200.
Warning

If you have anything running in those ports, the quickstart will fail because docker cannot start properly the images due to ports already in use.



Info

The first time you start these scripts, it may take a some time to start everything because they need to download the images and then run them in order.
After the first time, the starting process last no more than a minute.


Saga Suite Uninstallation

When you are done with your work, you can remove everything by executing the uninstall scripts (bat in Windows, sh in Linux).

saga-cleanup.bat - Windows

saga-cleanup.sh - Linux


This cleanup script stops the docker containers running, deletes them after stopped and removes the network where they were running.

Single Official Images

Saga-Server

Now, if you only require the docker image of Saga-Server, then you do not need to download, run and mount the whole quickstart from above.

You can get pull the image from our official repository using:

Code Block
//================================ CIO based images ==========================================
docker pull docker.repository.sca.accenture.com/docker/saga-server:1.3.3-javacio17-base
//OR
docker pull docker.repository.sca.accenture.com/docker/saga-server:1.3.3-tensor-javacio17-base

//=============================== Alpine based images ========================================
// ONLY FOR 1.3.4 ONWARDS
docker pull docker.repository.sca.accenture.com/docker/saga-server:1.3.4-SNAPSHOT-alpine3.19
//OR
docker pull docker.repository.sca.accenture.com/docker/saga-server:1.3.4-SNAPSHOT-tensor-alpine3.19
Info
If you want the latest features of SAGA, you can download the SNAPSHOT versions of our next release, however, they may be volatile and need to be used with caution. The tags for the SNAPSHOT versions are these ones:
1.3.4-SNAPSHOT-javacio17-base

1.3.4-SNAPSHOT-tensor-javacio17-base


And from then you can configure it and use it as you need, however there are some things you need to know before pulling and running this docker image:

  1. If it is your first time pulling the images, you will need to login with docker to our artifactory, otherwise, you will not be able to pull the image. (ONLY NEEDED FOR CIO IMAGES)

    Code Block
    docker login docker.repository.sca.accenture.com

    Then, as said before, you must enter your artifactory credentials.

  2. In order to run this image you need to have an Elasticsearch running and set the config for SAGA to point to that Elasticsearch.
  3. Now, this image has an entrypoint, which makes it executable from the start, so, when you run the image, it will try to override some configurations and start SAGA, so now, you do not need to enter the container and manually start the server.
  4. This same entrypoint script accepts and overrides different environmental variables in order to configure SAGA server at runtime, these are the following:
    1. SAGA_CONFIG : this JSON-like string contains all the config to overwrite the default one that comes with the image. It must be a one liner string due to environmental limitations when using docker.
      For example:

      This is a fragment of the config for SAGA to run. 

      Code Block
      collapsetrue
      {
        "config": {
          "apiPort": 8080,
          "secureApiPort": 443,
          "host": "0.0.0.0",
          "allow-domains": "localhost",
      	"serverTimeout": 30000,
          "maxRequestPayloadSize": 1000000,
          "cors": {
            "allow_origins": [
              "http://localhost:8080",
              "https://localhost",
              "https://login.microsoftonline.com"
            ],
            "allow_credentials": "true",
            "allow_methods": ["*"],
            "allow_headers": ["*"],
            "expose_headers": ["*"]
          },
          "security": {
            "enable": false,
            "encryptionKeyFile" : "./bin/saga.ek",
            "inactiveInterval": 600,
            "defaultRole": "admin",
            "users": [{
              "username": "admin",
              "password": "notpassword",
              "roles": "admin"
            }],
            "type": "none",
      
            "openid": {
              "serverURL": "http://localhost:8080",
              "clientId": "clientId",
              "discoveryURI": "discoveryURI"
            }
          },
          "ssl": {
            "enable": false,
            "keyStore": "./bin/saga.jks",
            "keyStorePassword": "encrypted:KCe8RrPQ8MV3po8NqHo0G7q7sa6T6yzf1JrTQ5VD0uty0elmrqRuybaAmrEHJ37d"
          },
          "libraryJars": [
            "./lib"
          ],
          "exportSettings" : {
            "maxSize" : 40,
            "batchSize" : 5000
          },
          "restHandlers": [],
          "models": [],
          "uiHandlers": [],
          "providers": [
            {
              "name": "filesystem-provider",
              "type": "FileSystem",
              "baseDir": "./config"
            },
            {
              "name": "saga-provider",
              "type": "Elastic",
              "nodeUrls": ["http://localhost:9200"],
              "timestamp": "updatedAt",
              "indexName": "saga",
              "encryptionKeyFile" : "./bin/saga.ek",
              "authentication": "none",
              "caFilePath": "",
              "timeout": 90,
              "delay": 5,
              "retries": 3,
              "exclude": [ ]
            }
          ],
      
          "gpt3": {
            "key": "",
            "openAIHost": "https://api.openai.com",
            "openAIAPIVersion": "v1"
          }
        }
      }

      And this is in the one-liner style that the SAGA_CONFIG environmental variable accepts:

      Code Block
      collapsetrue
      {"config":{"apiPort":8080,"secureApiPort":443,"host":"0.0.0.0","allow-domains":"localhost","serverTimeout":30000,"maxRequestPayloadSize":1000000,"cors":{"allow_origins":["http://localhost:8080","https://localhost","https://login.microsoftonline.com"],"allow_credentials":"true","allow_methods":["*"],"allow_headers":["*"],"expose_headers":["*"]},"security":{"enable":false,"encryptionKeyFile":"./bin/saga.ek","inactiveInterval":600,"defaultRole":"admin","users":[{"username":"admin","password":"notpassword","roles":"admin"}],"type":"none","openid":{"serverURL":"http://localhost:8080","clientId":"clientId","discoveryURI":"discoveryURI"}},"ssl":{"enable":false,"keyStore":"./bin/saga.jks","keyStorePassword":"encrypted:KCe8RrPQ8MV3po8NqHo0G7q7sa6T6yzf1JrTQ5VD0uty0elmrqRuybaAmrEHJ37d"},"libraryJars":["./lib"],"exportSettings":{"maxSize":40,"batchSize":5000},"restHandlers":[],"models":[],"uiHandlers":[],"providers":[{"name":"filesystem-provider","type":"FileSystem","baseDir":"./config"},{"name":"saga-provider","type":"Elastic","nodeUrls":["http://localhost:9200"],"timestamp":"updatedAt","indexName":"saga","encryptionKeyFile":"./bin/saga.ek","authentication":"none","caFilePath":"","timeout":90,"delay":5,"retries":3,"exclude":[]}],"gpt3":{"key":"","openAIHost":"https://api.openai.com","openAIAPIVersion":"v1"}}}
      Note

      This SAGA_CONFIG method has been deprecated (you can still use it), but now, you can use your own config files with all the environmental variables you want to configure and SAGA will use them accordingly.

    2. SAGA_CONFIG_PATH: Path to a config file that will be used instead of the default ones. Added to make mounting a docker volume easier.

      Info

      This path is to a config file, e.g <PATH>/config.json.
      However, this <PATH> also needs to have other config files, like the Custom Appender template logger file, otherwise SAGA will fail at startup.

      The files needed to be inside the same path as the config file are:
      "log4j2.properties", "sagaLoggerTemplate.json" and "stop_words.json". Or the contents of the default config folder.


    3. JAVA_INITIAL_MEMORY : The amount of initial memory Saga will start with. Default is '6g'.
    4. JAVA_MAX_MEMORY : 'The amount of initial memory Saga will start with. Default is '10g'.
    5. JAVA_META_MEMORY : The amount of initial memory Saga will start with. Default is '512m'.
    6. JAVA_MAX_META_MEMORY : The amount of initial memory Saga will start with. Default is '1024m'.

      Info

      All these values can be marked as ‘g' for GB, ‘m' for MB and ‘k' for KB.
      So, '6g' is six gigabytes and '512m' are in megabytes.
      Also when assigning the values exclude the quotes as they are just to demonstrate they are strings.

    7. SAGA_ELASTIC_USERNAME: The username to use on the providers section to connect to Elastic/OpenSearch.
    8. SAGA_ELASTIC_PASSWORD: The password to use on the providers section when connecting to Elastic/Opensearch.

      Info

      These last two environmental variables are used together and they'll call the "SAGA-Secure" jar to encrypt the password and automatically change the values on the SAGA config file.

    9. SAGA_DISABLE_SSL_VERIFY: This will disable all SSL certificate verification on SAGA for all requests (HTTP/Direct to provider). (USE IT ONLY FOR DEVELOPMENT/STAGING)

    10. ELASTIC_CA_PATH: The custom certificate path to connect to Elastic/OpenSearch via HTTPS.

    11. SAGA_CA_PATH: The custom certificate path to use for enabling HTTPS in SAGA.

      1. Info

        These last two environmental variables are used inside the docker entrypoint to import certificates to keystores.

        THEY NEED TO POINT TO AN EXISTING FILE INSIDE THE CONTAINER.
        So you can use a volume at the time of running the image or copy the certificates to build a custom image.


      Note
      titleIMPORTANT

      If you need to set multiple variables at the same time, you can use an environment file and send it at runtime inside the container to have them ready to use.

      We have an example file in the repo of SAGA, but it looks something like this:

      Code Block
      titleSaga .env file
      #Saga configuration file as a JSON-oneliner (can be sent as a volumen mount)
      SAGA_CONFIG={"config":{"apiPort":8080,"secureApiPort":443,"host":"0.0.0.0","allow-domains":"localhost","serverTimeout":30000,"disableHTTPSSLVerification":false,"maxRequestPayloadSize":1000000,"cors":{"allow_origins":["http://localhost:8080","https://localhost","https://login.microsoftonline.com"],"allow_credentials":"true","allow_methods":["*"],"allow_headers":["*"],"expose_headers":["*"]},"security":{"enable":false,"encryptionKeyFile":"./bin/saga.ek","inactiveInterval":600,"defaultRole":"admin","users":[{"username":"admin","password":"notpassword","roles":"admin"}],"type":"none","openid":{"serverURL":"http://localhost:8080","clientId":"clientId","discoveryURI":"discoveryURI"}},"ssl":{"enable":true,"keyStore":"./bin/saga.jks","keyStorePassword":"encrypted:CR6NG4jVr81j8cAU80wWOLOA5J6b5R6isNfiYPVpov5cke+Z4U1P1+IdVSa2QwQu"},"libraryJars":["./lib"],"exportSettings":{"maxSize":40,"batchSize":5000},"restHandlers":[],"models":[],"uiHandlers":[],"providers":[{"name":"filesystem-provider","type":"FileSystem","baseDir":"./config"},{"name":"saga-provider","type":"Elastic","nodeUrls":["http://localhost:9200"],"timestamp":"updatedAt","indexName":"saga","encryptionKeyFile":"./bin/saga.ek","authentication":"none","caFilePath":"","trustAllSSL":false,"timeout":90,"delay":5,"retries":3,"exclude":[]}],"logging_provider":{"name":"saga-logging-provider","type":"Elastic","nodeUrls":["http://localhost:9200"],"timestamp":"updatedAt","indexName":"saga","encryptionKeyFile":"./bin/saga.ek","authentication":"none","caFilePath":"","trustAllSSL":false,"timeout":90,"delay":5,"retries":3,"exclude":[]},"gpt3":{"key":"","openAIHost":"https://api.openai.com","openAIAPIVersion":"v1"}}}
      
      # Elastic/Opensearch username/password
      SAGA_ELASTIC_USERNAME=elastic
      SAGA_ELASTIC_PASSWORD=password
      
      # Memory settings
      JAVA_INITIAL_MEMORY=6g
      JAVA_MAX_MEMORY=10g
      JAVA_META_MEMORY=512m
      JAVA_MAX_META_MEMORY=1024m
      
      # Certificate paths (to be imported into keystores)
      ELASTIC_CA_PATH=/usr/src/elastic_certificate/elastic.crt
      SAGA_CA_PATH=/usr/src/saga_certificate/saga.crt
      Note
      titleNOTE

      You can use volumes as well to mount specific files into the running container, e.g. the certificates files and the config.json.

      Here you can see the documentation regarding the configuration and usage of volumes in docker.

      Also in Kubernetes you can mount volumes as well.

ESUI

As well as the SAGA image, you can download the Enterprise Search UI docker image and run it where you need it using:

Code Block
docker pull docker.repository.sca.accenture.com/docker/esui:latest


Some of the basic configuration that can be do it via environmental variables are these:

  • ESUI_PORT : The port where ESUI will start, defaults to 3000.
  • ESUI_ELASTIC_URL : The location where the ElasticSearch is running, defaults to "http://localhost:9200".
  • SAGA_URL : The location where SAGA server is running, defaults to "http://localhost:8080".

Python Bridge

For the Saga-Python-Bridge, the image can be downloaded using:

Code Block
//================================ CIO based images ==========================================
docker pull docker.repository.sca.accenture.com/docker/saga-python-bridge:1.3.3-ubuntu22.04cio-base

// ONLY FOR 1.3.4 ONWARDS
docker pull docker.repository.sca.accenture.com/docker/saga-python-bridge:1.3.4-SNAPSHOT-ubuntu22.04cio-basic
docker pull docker.repository.sca.accenture.com/docker/saga-python-bridge:1.3.4-SNAPSHOT-ubuntu22.04cio-all

//=============================== Debian 12 based images ========================================
// ONLY FOR 1.3.4 ONWARDS
docker pull docker.repository.sca.accenture.com/docker/saga-python-bridge:1.3.4-SNAPSHOT-debian12-basic
docker pull docker.repository.sca.accenture.com/docker/saga-python-bridge:1.3.4-SNAPSHOT-debian12-all
Info

If you want the latest features of the Python-Bridge, you can download the SNAPSHOT version of our next release, however, they may be volatile and need to be used with caution. The tag for the SNAPSHOT version is this one:
1.3.4-SNAPSHOT-ubuntu22.04cio-basic

1.3.4-SNAPSHOT-ubuntu22.04cio-all

Regarding the images, we Regarding the images, we have a "basic" with just the required dependencies to make the python bridge work with no models, and an "all" tag with all the libraries installed, the difference is between (5 to 10 GB in size depending on the image).

And from then you can configure it and use it as you need, however there are some things you need to know before pulling and running this docker image:

  1. If it is your first time pulling the images, you will need to login with docker to our artifactory, otherwise, you will not be able to pull the image. (ONLY NEEDED FOR CIO IMAGES)

    Code Block
    docker login docker.repository.sca.accenture.com

    Then, as said before, you must enter your artifactory credentials.

  2. Now, this image has an entrypoint, which makes it executable from the start, so, when you run the image, it will try to override some configurations and start the Python Bridge, so now, you do not need to enter the container and manually start the server. (ONLY FOR 1.3.4 ONWARDS)
  3. This same entrypoint script accepts and overrides different environmental variables in order to configure the python server at runtime, these are the following: (ONLY FOR 1.3.4 ONWARDS)
    1. PB_CONFIG : this JSON-like string contains all the config to overwrite the default one that comes with the image. It must be a one liner string due to environmental limitations when using docker.
      For example:

      This is a fragment of the config for the python bridge to run. 

      Code Block
      collapsetrue
      {
        "host": "0.0.0.0",
        "port": 5000,
        "ssl": {
          "enabled": false,
          "secure_port": 5443,
          "certificate": {
            "cert": "cert.pem",
            "key": "key.pem"
          }
        },
        "authentication": {
          "enabled": false,
          "credentials": {
            "user": "admin",
            "password": "password"
          }
        },
        "threads": 30,
        "logging": {
          "level": "info",
          "loggers": {
            "werkzeug": "info",
            "gensim.utils": "warn",
            "pytorch_pretrained_bert.modeling": "warn",
            "pytorch_pretrained_bert.tokenization": "warn"
          }
        },
        "models_data_dir": "models_data",
        "model_types": {
          "Classification_watcher_example": {
            "enabled": false,
            "input_data_as_tokens": false,
            "model_names": [
              "Classification_watcher_example"
            ],
            "default_model": "Classification_watcher_example"
          },
          "LatentSemanticIndexing": {
            "enabled": false,
            "input_data_as_tokens": false,
            "model_names": [
              "lsi"
            ]
          },
          "Bert": {
            "enabled": false,
            "input_data_as_tokens": false,
            "model_names": [
              "bert-base-uncased"
            ],
            "default_model": "bert-base-uncased"
          },
          "BioBert": {
            "enabled": false,
            "input_data_as_tokens": false,
            "model_names": [
              "biobert-base-cased-v1.2"
            ],
            "default_model": "biobert-base-cased-v1.2"
          },
          "BertQA": {
            "enabled": false,
            "input_data_as_tokens": false,
            "model_names": [
              "bert-large-uncased-whole-word-masking-finetuned-squad"
            ],
            "default_model": "bert-large-uncased-whole-word-masking-finetuned-squad"
          },
          "SBert": {
            "enabled": false,
            "input_data_as_tokens": false,
            "model_names": [
              "bert-base-nli-stsb-mean-tokens",
              "bert-base-nli-mean-tokens",
              "distilbert-base-nli-stsb-mean-tokens"
            ],
            "default_model": "bert-base-nli-stsb-mean-tokens"
          },
          "SentimentAnalysisVader": {
            "enabled": false,
            "input_data_as_tokens": false,
            "model_names": [
              "vader"
            ]
          },
          "SentimentAnalysisTextBlob": {
            "enabled": false,
            "input_data_as_tokens": false,
            "model_names": [
              "textBlob"
            ]
          },
          "TfidfVectorizer": {
            "enabled": false,
            "input_data_as_tokens": false,
            "model_names": [
              "Tfidf"
            ]
          },
          "GTRT5": {
            "enabled": false,
            "input_data_as_tokens": false,
            "model_names": [
              "gtr-t5-base",
              "gtr-t5-xl"
            ],
            "default_model": "gtr-t5-base"
          },
          "T5": {
            "enabled": false,
            "input_data_as_tokens": false,
            "model_names": [
              "sentence-t5-base"
            ]
          },
          "MiniLM": {
            "enabled": false,
            "input_data_as_tokens": false,
            "model_names": [
              "all-MiniLM-L12-v2"
            ]
          }
        }
      }

      And this is in the one-liner style that the PB_CONFIG environmental variable accepts:

      Code Block
      collapsetrue
      {"host":"0.0.0.0","port":5000,"ssl":{"enabled":false,"secure_port":5443,"certificate":{"cert":"cert.pem","key":"key.pem"}},"authentication":{"enabled":false,"credentials":{"user":"admin","password":"password"}},"threads":30,"logging":{"level":"info","loggers":{"werkzeug":"info","gensim.utils":"warn","pytorch_pretrained_bert.modeling":"warn","pytorch_pretrained_bert.tokenization":"warn"}},"models_data_dir":"models_data","model_types":{"Classification_watcher_example":{"enabled":true,"input_data_as_tokens":false,"model_names":["Classification_watcher_example"],"default_model":"Classification_watcher_example"},"LatentSemanticIndexing":{"enabled":false,"input_data_as_tokens":false,"model_names":["lsi"]},"Bert":{"enabled":true,"input_data_as_tokens":false,"model_names":["bert-base-uncased"],"default_model":"bert-base-uncased"},"BioBert":{"enabled":false,"input_data_as_tokens":false,"model_names":["biobert-base-cased-v1.2"],"default_model":"biobert-base-cased-v1.2"},"BertQA":{"enabled":false,"input_data_as_tokens":false,"model_names":["bert-large-uncased-whole-word-masking-finetuned-squad"],"default_model":"bert-large-uncased-whole-word-masking-finetuned-squad"},"SBert":{"enabled":false,"input_data_as_tokens":false,"model_names":["bert-base-nli-stsb-mean-tokens","bert-base-nli-mean-tokens","distilbert-base-nli-stsb-mean-tokens"],"default_model":"bert-base-nli-stsb-mean-tokens"},"SentimentAnalysisVader":{"enabled":true,"input_data_as_tokens":false,"model_names":["vader"]},"SentimentAnalysisTextBlob":{"enabled":true,"input_data_as_tokens":false,"model_names":["textBlob"]},"TfidfVectorizer":{"enabled":true,"input_data_as_tokens":false,"model_names":["Tfidf"]},"GTRT5":{"enabled":true,"input_data_as_tokens":false,"model_names":["gtr-t5-base","gtr-t5-xl"],"default_model":"gtr-t5-base"},"T5":{"enabled":true,"input_data_as_tokens":false,"model_names":["sentence-t5-base"]},"MiniLM":{"enabled":true,"input_data_as_tokens":false,"model_names":["all-MiniLM-L12-v2"]}}}
      1. Note

        This PB_CONFIG method has been deprecated (you can still use it), but now, you can use your own config files with all the environmental variables you want to configure and SAGA the python bridge will use them accordingly.

        ALSO...


        If you use this and the config has some default models enabled, you need to use the corresponding environmental variable from the next list to use them, otherwise, you will encounter errors at starting up the python server.


    2. MODEL_DATA_DIR: Path where the models will be downloaded/loaded (useful if using volumes for offline environments). Default is '/app/models_data'.
    3. INSTALL_LIBRARIES: To install the libraries used by any of the options below.
      1. Info

        If you do not need to install libraries (if the image already have them for example) this environmental variable should not be used!

    4. ENABLE_ALL_EXTRA_DEPS: To install enable all the extra-dependencies for all the models configured in both the config file and the pyproject.toml. 
    5. BERT_ENABLED: To enable the BERT models inside the config file and install the extra dependencies related to it.
    6. BIOBERT_ENABLED=To enable the BioBERT models inside the config file and install the extra dependencies related to it.
    7. BERTQA_ENABLED=To enable the BERTQA models inside the config file and install the extra dependencies related to it.
    8. GTRT5_ENABLED=To enable the GTR-T5 models inside the config file and install the extra dependencies related to it.
    9. LSI_ENABLED=To enable the LSI models inside the config file and install the extra dependencies related to it.
    10. MINILM_ENABLED=To enable the MiniLM models inside the config file and install the extra dependencies related to it.
    11. SBERT_ENABLED=To enable the SBERT models inside the config file and install the extra dependencies related to it.
    12. TEXTBLOB_ENABLED=To enable the TextBlob models inside the config file and install the extra dependencies related to it.
    13. TFIDF_ENABLED=To enable the TFIDF models inside the config file and install the extra dependencies related to it.
    14. T5_ENABLED=To enable the T5 models inside the config file and install the extra dependencies related to it.
    15. VADER_ENABLED=To enable the Vader models inside the config file and install the extra dependencies related to it. 


      Info

      All these "enabled" variables must be sent always if you are using any of these models.

      OR...

      You can use the config.json file and enable them from there, but you'll need to manually install the dependencies needed as well.

      Note
      titleIMPORTANT

      If you need to set multiple variables at the same time, you can use an environment file and send it at runtime inside the container to have them ready to use.

      We have an example file in the repo of Python Bridge, but it looks something like this:

      Code Block
      titleSaga .env file
      #Python Bridge configuration file as a JSON-oneliner (can be sent as a volumen mount)
      PB_CONFIG={"host":"0.0.0.0","port":5000,"ssl":{"enabled":false,"secure_port":5443,"certificate":{"cert":"cert.pem","key":"key.pem"}},"authentication":{"enabled":false,"credentials":{"user":"admin","password":"password"}},"threads":30,"logging":{"level":"info","loggers":{"werkzeug":"info","gensim.utils":"warn","pytorch_pretrained_bert.modeling":"warn","pytorch_pretrained_bert.tokenization":"warn"}},"models_data_dir":"models_data","model_types":{"Classification_watcher_example":{"enabled":true,"input_data_as_tokens":false,"model_names":["Classification_watcher_example"],"default_model":"Classification_watcher_example"},"LatentSemanticIndexing":{"enabled":false,"input_data_as_tokens":false,"model_names":["lsi"]},"Bert":{"enabled":true,"input_data_as_tokens":false,"model_names":["bert-base-uncased"],"default_model":"bert-base-uncased"},"BioBert":{"enabled":false,"input_data_as_tokens":false,"model_names":["biobert-base-cased-v1.2"],"default_model":"biobert-base-cased-v1.2"},"BertQA":{"enabled":false,"input_data_as_tokens":false,"model_names":["bert-large-uncased-whole-word-masking-finetuned-squad"],"default_model":"bert-large-uncased-whole-word-masking-finetuned-squad"},"SBert":{"enabled":false,"input_data_as_tokens":false,"model_names":["bert-base-nli-stsb-mean-tokens","bert-base-nli-mean-tokens","distilbert-base-nli-stsb-mean-tokens"],"default_model":"bert-base-nli-stsb-mean-tokens"},"SentimentAnalysisVader":{"enabled":true,"input_data_as_tokens":false,"model_names":["vader"]},"SentimentAnalysisTextBlob":{"enabled":true,"input_data_as_tokens":false,"model_names":["textBlob"]},"TfidfVectorizer":{"enabled":true,"input_data_as_tokens":false,"model_names":["Tfidf"]},"GTRT5":{"enabled":true,"input_data_as_tokens":false,"model_names":["gtr-t5-base","gtr-t5-xl"],"default_model":"gtr-t5-base"},"T5":{"enabled":true,"input_data_as_tokens":false,"model_names":["sentence-t5-base"]},"MiniLM":{"enabled":true,"input_data_as_tokens":false,"model_names":["all-MiniLM-L12-v2"]}}}
      
      # Path where the models will be loaded (useful if using volumes for offline environments)
      MODEL_DATA_DIR=/app/models_data
      
      # Models settings (to enable which models the PB will download/load and install the extra dependencies)
      # Only de-comment the ones you want to use
      #INSTALL #INSTALL_LIBRARIES=true
      #ENABLE_ALL_EXTRA_DEPS=true
      #BERT_ENABLED=true
      #BIOBERT_ENABLED=true
      #BERTQA_ENABLED=true
      #GTRT5_ENABLED=true
      #LSI_ENABLED=true
      #MINILM_ENABLED=true
      #SBERT_ENABLED=true
      #TEXTBLOB_ENABLED=true
      #TFIDF_ENABLED=true
      #T5_ENABLED=true
      #VADER_ENABLED=true
      Note
      titleNOTE

      You can use volumes as well to mount specific files into the running container, e.g. the certificates files and the config.json.

      Here you can see the documentation regarding the configuration and usage of volumes in docker.

      Also in Kubernetes you can mount volumes as well.


Content by Label
showLabelsfalse
max5
spacessaga131
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("docker","containers") and type = "page" and space = "saga131"
labelsdocker containers

Page properties
hiddentrue
Related issues