Skip to content

cedrickring/cora-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cora Deployment

This repository contains the necessary files to run the Cora application using Docker and Docker Compose.

Pre-requisites

Make sure to have the following tools installed:

Configuring the application

After cloning the repository, the application can be configured by altering the .env file in this repo. To create a new .env file, copy the .env.sample file and adjust the values accordingly.

OpenAI

For OpenAI you must set the following environment variables accordingly:

OPENAI_API_BASE="https://api.openai.com/v1"
OPENAI_API_KEY="<YOUR_API_KEY>"
OPENAI_EMBEDDINGS_MODEL="<YOUR_EMBEDDINGS_MODEL>"
OPENAI_GPT_MODEL="<YOUR_GPT_MODEL>"
BACKEND_URL="<PUBLIC HOST OF BACKEND>"

Azure OpenAI

For Azure OpenAI you must set the following environment variables accordingly:

OPENAI_API_BASE="<YOUR_ENDPOINT>"
OPENAI_API_KEY="<YOUR_API_KEY>"
OPENAI_EMBEDDINGS_MODEL="<YOUR_EMBEDDINGS_MODEL>"
OPENAI_GPT_MODEL="<YOUR_GPT_MODEL>"
BACKEND_URL="<PUBLIC HOST OF BACKEND>"

# Azure specific variables
OPENAI_API_TYPE="azure"
AZURE_EMBEDDINGS_DEPLOYMENT="<YOUR_EMBEDDINGS_DEPLOYMENT>"
AZURE_GPT_MODEL_DEPLOYMENT="<YOUR_GPT_MODEL_DEPLOYMENT>"

Preprocessing the data

Before running the application, you need to preprocess the documents you want to ask questions against. The documents need to be put in input_files/. For now, we only support .pdf files.

To preprocess the documents, run the following command:

docker compose run preprocessing

This will preprocess the documents and store the results in the vector_databases/ directory. As soon as the process is complete, you can continue with the next step: Running the application.

NOTE: This process can take a few minutes depending on the amount and the size of the documents to process.

Running the application

This repository contains an automatically updated compose.yaml file that will pull the latest version of the Cora application and run it. In addition to the autoconfiguration, you need to manually specify the environment variables specified in the .env.sample file. You can do this by copying the .env.sample file to .env and adjust the values accordingly.

cp .env.sample .env

After setting the environment variables, you can run the application using the following command:

docker compose up -d

Stopping the application

To stop the application, run the following command:

docker compose down

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published