Sign inSign up

fireport/ai-dial-generic-rag-backend

By fireport

•Updated 3 days ago

AI DIAL Generic RAG backend 0.3.2 with group-0 permissions for OpenShift (arbitrary UID)

Image
Machine learning & AI
0

32

fireport/ai-dial-generic-rag-backend repository overview

⁠ai-dial-generic-rag-backend (OpenShift-compatible)

AI DIAL Generic RAG backend⁠ rebuilt so it starts under OpenShift's default restricted-v2 SCC, which runs containers with an arbitrary UID and GID 0.

Unofficial build. This repository is not affiliated with or endorsed by EPAM. The application code and the bundled embedding model come unchanged from the upstream image epam/ai-dial-generic-rag-backend.

⁠What is different from the upstream image

On OpenShift the upstream image fails at startup with:

FileNotFoundError: Path /home/appuser/bge-small-en not found

The model directory is owned by appuser and is not reachable by the random UID that OpenShift assigns. This image only changes file permissions:

  • /home/appuser is made group-0 owned, with group permissions equal to the owner's, and readable/traversable by others
  • MPLCONFIGDIR=/tmp/matplotlib, so matplotlib does not try to write to /.config

Nothing else is modified, and the original USER of the base image is kept.

⁠Tags

TagBase image
0.3.2-openshiftepam/ai-dial-generic-rag-backend:0.3.2

⁠Configuration

Settings are read from environment variables. Main ones (see the upstream README for the full list):

VariableRequiredDescription
DIAL_URLyesURL of DIAL Core
DIAL_API_KEYnoAPI key for background jobs such as indexing
DB_HOSTyesPostgreSQL host (with the pgvector extension)
DB_PORTnoPostgreSQL port, default 5432
DB_NAMEyesDatabase name
DB_USERNAMEyesDatabase user
DB_PASSWORDnoDatabase password
DB_MSI_ENABLEDnoUse MSI authentication, default false
IN_MEMORY_CACHE_ENABLEDnoIn-memory file cache, default true
IN_MEMORY_CACHE_CAPACITYnoCache size, for example 128MiB

The container listens on port 5000, and /health is the health check endpoint.

⁠Run with Docker

docker run --rm -p 5000:5000 \
  -e DIAL_URL=http://dial-core:8080 \
  -e DB_HOST=postgres -e DB_NAME=statgpt \
  -e DB_USERNAME=statgpt -e DB_PASSWORD=<password> \
  fireport/ai-dial-generic-rag-backend:0.3.2-openshift

⁠Use in the StatGPT Helm chart

generic-rag:
  image:
    registry: docker.io
    repository: fireport/ai-dial-generic-rag-backend
    tag: 0.3.2-openshift

⁠Check it works with a random UID

docker run --rm --user 1000970000:0 --entrypoint sh \
  fireport/ai-dial-generic-rag-backend:0.3.2-openshift \
  -c 'ls /home/appuser/bge-small-en'

⁠Build it yourself

docker build --platform linux/amd64 \
  --build-arg BASE_TAG=0.3.2 --build-arg APP_USER=appuser \
  -t fireport/ai-dial-generic-rag-backend:0.3.2-openshift .

Tag summary

Content type

Image

Digest

sha256:0559faa69…

Size

1.1 GB

Last updated

3 days ago

docker pull fireport/ai-dial-generic-rag-backend:0.3.2-openshift