Installation

To install Omnicron, follow these steps:

1

Clone the Repository

Clone the Git repository to your local machine:

git clone https://github.com/kingmariano/omnicron.git
2

Set Up Environment Variables

Configure the necessary environment variables for Omnicron.

  • MY API KEY: Generate a random API key. It can be done using various methods. Either by using openssl or any other method suitable for you.
openssl rand -base64 32
  • Port: Set the port to 9000 or any other port number.

  • GROK API KEY: Signup/Login to the Grok Console Cloud and retrieve your API token.

  • GEMINI PRO API KEY: Signup/Login to the Google Gemini Studio and retrieve your API token.

  • REPLICATE API TOKEN: Signup/Login to Replicate and retrieve your API token.

  • CLOUDINARY URL: Signup/Login to Cloudinary. Navigate to the Cloudinary Console and get your Cloudinary URL secret. It should look like this: cloudinary://<your_api_key>:<your_api_secret>@djagytapi

    • TESSDATA PREFIX: This is the location of where Tesseract is installed on your machine. Install Tesseract for your OS and set the location to /usr/local/share/tessdata for Linux or C:\Program Files\Tesseract-OCR\tessdata for Windows. If yours is configured to a different file location, set it to where the tessdata location is on your machine.
  • FAST API BASE URL: Set this to http://0.0.0.0:8000 or http://localhost:8000 to connect the FastAPI server to the Go code.

  • Environment Variables: Create a .env file in the project root directory and add the following:

env
PORT=9000
MY_API_KEY=YOUR_API_KEY_HERE
GROK_API_KEY=YOUR_GROK_API_KEY_HERE
GEMINI_PRO_API_KEY=YOUR_GEMINI_PRO_API_KEY_HERE
REPLICATE_API_TOKEN=YOUR_REPLICATE_API_TOKEN_HERE
CLOUDINARY_URL=YOUR_CLOUDINARY_URL_HERE
TESSDATA_PREFIX=/usr/local/share/tessdata  # or C:\Program Files\Tesseract-OCR\tessdata for Windows
FAST_API_BASE_URL=http://0.0.0.0:8000
3

Build and Run the Application

First, install all the Python dependencies by running:

bash
pip install --upgrade -r ./python/requirements.txt

Then build and run the application:

bash
go build -o omnicron && ./omnicron
4

Using Docker Compose

You can use Docker Compose to build the image:

docker
docker-compose up --build
5

Usage

After setting up and running the application, you can navigate to http://localhost:9000/readiness to check the health of the application.