Google Cloud Platform (GCP) offers a robust and scalable environment for deploying R2R (RAG to Riches). This guide will walk you through the process of setting up R2R on a Google Compute Engine instance, making it accessible both locally and publicly.
# Set required remote providersexport OPENAI_API_KEY=sk-...# Optional - pass in a custom configuration herer2r serve --docker --full
Double check the health of the system:
Copy
Ask AI
r2r health
Test ingesting and searching a sample document from a remote environment:
Copy
Ask AI
# From your local machiner2r --base-url=http://<your-instance-external-ip>:7272 ingest-sample-filesleep 10r2r --base-url=http://<your-instance-external-ip>:7272 search --query='Who was aristotle?'
Replace <your-instance-external-ip> with your Google Compute Engine instance’s external IP address.
You have now successfully deployed R2R on Google Cloud Platform. The application should be accessible locally through SSH tunneling and optionally publicly through direct access to the Compute Engine instance. Remember to configure authentication and implement proper security measures before exposing your R2R instance to the public internet.For more information on configuring and using R2R, refer to the configuration documentation.