6 Starting the services

This topic describes the systematic instructions to starting the services.

  1. Set the following proxies and variables:
    1. export https_proxy=""
    2. export http_proxy=""
    3. export https_proxy_domain="<domain_name of_above_https_proxy>"
    4. export https_proxy_port=<port_of_above_https_proxy>
  2. Create logs directory.
    1. cd <root_dir>
    2. mkdir logs
  3. After installing the wheel package and the dependencies and setting up the configuration files, we can run the AI Foundation services using the below-mentioned commands:
    1. CMC-AIF-ACCESS-SERVICE
      1. nohup uvicorn cmc_aif_access_services.__main__:app --port <PORT> --loop asyncio --host <HOST_NAME> --workers 4 & tail -f nohup.out
    2. CMC-AIF-DATA-INGESTION-SERVICES
      1. nohup uvicorn cmc_aif_data_ingestion_services.__main__:app --port <PORT> --loop asyncio --host <HOST_NAME> --workers 4 & tail -f nohup.out
    3. CMC-AIF-EMBEDDING-SERVICES
      1. nohup uvicorn cmc_aif_embedding_services.__main__:app --port <PORT> --loop asyncio --host <HOST_NAME> --workers 4 & tail -f nohup.out
    4. CMC-AIF-GENERATE-SERVICES
      1. nohup uvicorn cmc_aif_generate_services.__main__:app --port <PORT> --loop asyncio --host <HOST_NAME> --workers 4 & tail -f nohup.out
    5. CMC-AIF-RAG-SERVICES
      1. nohup uvicorn cmc_aif_rag_services.__main__:app --port <PORT> --loop asyncio --host <HOST_NAME> --workers 4 & tail -f nohup.out
  4. To terminate/kill the app, use the netstat command to find the process_id using the port on which the app is running and then use the kill command with the process_id of the app as shown below to terminate the application.
    netstat -nlp | grep <PORT>
    kill -9 <process_id>