6 Starting the services
This topic describes the systematic instructions to starting the services.
- Set the following proxies and variables:
- export https_proxy=""
- export http_proxy=""
- export https_proxy_domain="<domain_name of_above_https_proxy>"
- export https_proxy_port=<port_of_above_https_proxy>
- Create logs directory.
- cd <root_dir>
- mkdir logs
- 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:
CMC-AIF-ACCESS-SERVICE- nohup uvicorn cmc_aif_access_services.__main__:app --port <PORT> --loop asyncio --host <HOST_NAME> --workers 4 & tail -f nohup.out
CMC-AIF-DATA-INGESTION-SERVICES- nohup uvicorn cmc_aif_data_ingestion_services.__main__:app --port <PORT> --loop asyncio --host <HOST_NAME> --workers 4 & tail -f nohup.out
CMC-AIF-EMBEDDING-SERVICES- nohup uvicorn cmc_aif_embedding_services.__main__:app --port <PORT> --loop asyncio --host <HOST_NAME> --workers 4 & tail -f nohup.out
CMC-AIF-GENERATE-SERVICES- nohup uvicorn cmc_aif_generate_services.__main__:app --port <PORT> --loop asyncio --host <HOST_NAME> --workers 4 & tail -f nohup.out
CMC-AIF-RAG-SERVICES- nohup uvicorn cmc_aif_rag_services.__main__:app --port <PORT> --loop asyncio --host <HOST_NAME> --workers 4 & tail -f nohup.out
- To terminate/kill the app, use the
netstatcommand to find theprocess_idusing 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>