This is a project that is currently being developed to build a RAG based system for the upcoming EIC. Refer to the Description about the project.
- Create a virtual environment:
export RAG4EIC_PROJECT=/path/to/your/project
python -m venv $RAG4EIC_PROJECT/env_RAG4EIC-V0
source $RAG4EIC_PROJECT/env_RAG4EIC-V0/bin/activate
- Install Poetry:
Poetry is a dependency management tool for Python. You can install it using the following command:
curl -sSL https://install.python-poetry.org | python3 -
- Install the project dependencies:
poetry install
- Clone from the repository:
git clone https://github.com/ai4eic/EIC-RAG-Project.git $RAG4EIC_PROJECT/EIC-RAG-Project
cd $RAG4EIC_PROJECT/EIC-RAG-Project
-
Running the webapp
- Ask
[email protected]
about thesecrets.toml
andconfig.toml
- Create a folder named
.streamlit
in the parent directory and move the filessecrets.toml
andconfig.toml
in there. - Now run
streamlit run streamlit_app/AI4EIC-RAGAS4EIC.py
. This should run on ahttp://localhost:8050
- Ask
- If any new library has been used in the app that requires installation through pip. Make sure to use the
--format freeze
when updating therequirements.txt
- The command is
pip list --format freeze > requirements.txt
This project includes Docker support for easy deployment and testing.
- Docker installed on your system
- A
secrets.toml
file with your API keys and credentials
- Make the build script executable:
chmod +x build-and-run.sh
- Build and run the application:
./build-and-run.sh /path/to/your/secrets.toml
- Access the application:
- Production app runs on port 8502
- Access at: http://localhost:8502
- Management commands:
# Stop the container
docker stop eic-rag-app
# Remove the container
docker rm eic-rag-app
# View logs
docker logs -f eic-rag-app
You can also use Docker Compose with the helper script:
- Make the Docker Compose script executable:
chmod +x docker-compose-run.sh
- Run with your secrets file:
./docker-compose-run.sh /path/to/your/secrets.toml
- Access at: http://localhost:8502
Alternative methods:
Using environment variable directly:
SECRETS_FILE=/path/to/your/secrets.toml docker-compose up -d
Using a .env
file (create in project root):
SECRETS_FILE=/path/to/your/secrets.toml
Then run: docker-compose up -d
Management commands:
# Stop services
docker-compose down
# View logs
docker-compose logs -f
# Restart services
docker-compose restart
Your secrets.toml
file should contain:
OPENAI_API_KEY = "your_openai_key"
PINECONE_API_KEY = "your_pinecone_key"
ADMIN_EMAIL = "your_admin_email"
ADMIN_PASSWORD = "your_admin_password"
- All Docker configurations use port 8502
- Secrets file is mounted as read-only volume
- Containers automatically restart unless stopped manually