3 Starting The Application

This topic describes the information to start the application process.

Make sure the wheel package and the dependencies are installed, and OCI Credentials and configuration setup is complete.
  1. Run the genai_doc_analyzer server using the below-mentioned command:
    python -m genai_doc_analyzer
  2. By default the application runs on port 7777. You can change the port by passing –p argument.
    For example: python -m genai_doc_analyzer -p 5000
  3. To run the service in the background, use the command below.

    nohup python -m genai_doc_analyzer > nohup.txt

    Note:

    After the execution of the above command, all the execution logs will be added to nohup.txt which is a text file. Now you may close the terminal and the application will keep running on port, unless stopped explicitly.
  4. By default the application starts on http. You can change the protocol by passing the -s argument.

    python -m genai_doc_analyzer –p 5000 -s https

    python –m genai_doc_analyzer –p 5000 -s

    This starts the application on both http and https protocols on ports 5000 and 5001 respectively.

    Note:

    To run the service on https port, set the SSL_CERTIFICATE and SSL_KEY paths as mentioned in the Configuration Update section.
  5. To terminate or kill the application, use the netstat command to find the process_id using the port on which the application is running. Then use the kill command with the process_id as shown below to terminate the application.

    netstat -nlp | grep 7777

    kill -9 <process_id>