Skip to content

Commit

Permalink
Release 0.2.74
Browse files Browse the repository at this point in the history
  • Loading branch information
NolanTrem authored Jul 31, 2024
2 parents c498d29 + f051a10 commit 916190b
Show file tree
Hide file tree
Showing 57 changed files with 2,581 additions and 1,550 deletions.
71 changes: 0 additions & 71 deletions .github/workflows/build-main-v2.yml

This file was deleted.

89 changes: 46 additions & 43 deletions .github/workflows/integration-test-workflow-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,53 @@ name: Debian R2R Docker Build and Integration Test (Debian GNU/Linux 12 (bookwor

on:
push:
branches: [ main ]
pull_request:
branches:
- '**'
workflow_dispatch:

jobs:
build-and-test:
runs-on: [ self-hosted, Linux ]
permissions:
packages: write
contents: read
id-token: write
actions: write
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build R2R Docker image
run: |
docker build \
--build-arg GITHUB_SHA=${{ github.sha }} \
--build-arg GITHUB_REF=${{ github.ref }} \
-t emrgntcmplxty/r2r:${{ github.sha }} .
- name: Pull pgvector image
run: docker pull pgvector/pgvector:pg16
- name: Docker Auth
uses: docker/login-action@v3
with:
username: ${{ secrets.RAGTORICHES_DOCKER_UNAME }}
password: ${{ secrets.RAGTORICHES_DOCKER_TOKEN }}

- name: Create Docker network
run: docker network create sciphi-network
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Start Postgres
run: |
docker run -d --name postgres --network sciphi-network \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=postgres \
pgvector/pgvector:pg16
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Start R2R
- name: Set image name
id: image
run: |
docker run -d --name r2r --network sciphi-network \
-e PYTHONUNBUFFERED=1 \
-e OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_HOST=postgres \
-e POSTGRES_PORT=5432 \
-e POSTGRES_DBNAME=postgres \
-e POSTGRES_VECS_COLLECTION=vecs \
-p 8000:8000 \
emrgntcmplxty/r2r:${{ github.sha }}
sleep 10
- name: Run integration tests in Docker container
echo "IMAGE_NAME=ragtoriches/dev" >> $GITHUB_OUTPUT
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ragtoriches/dev:latest
platforms: linux/amd64
no-cache: true
pull: true

- name: Run cloud LLM integration tests in Docker
run: |
python3 -m venv venv
source venv/bin/activate
Expand All @@ -59,6 +57,12 @@ jobs:
echo "R2R Version"
r2r version
echo "R2R Serve --docker"
r2r serve --docker --exclude-neo4j --exclude-ollama --image=ragtoriches/dev:latest
echo "Waiting for services to start..."
sleep 30
echo "Ingest Data"
r2r ingest-sample-files
Expand Down Expand Up @@ -95,12 +99,11 @@ jobs:
echo "Logging"
r2r logs
echo "Docker Down"
r2r docker-down
- name: Clean up
if: always()
run: |
echo "Clean up Virtual Environment"
deactivate
rm -rf venv
docker stop r2r postgres
docker rm r2r postgres
docker network rm sciphi-network
docker system prune -af --volumes
docker volume rm $(docker volume ls -qf dangling=true)
79 changes: 0 additions & 79 deletions .github/workflows/local-integration-test-workflow-debian.yml

This file was deleted.

29 changes: 29 additions & 0 deletions compose.postgres.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
networks:
r2r-network:
name: r2r-network

services:
r2r:
depends_on:
postgres:
condition: service_healthy

postgres:
image: pgvector/pgvector:pg16
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_DB=${POSTGRES_DBNAME:-postgres}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- r2r-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 10s
timeout: 5s
retries: 5
restart: on-failure

volumes:
postgres_data:
26 changes: 4 additions & 22 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ x-depends-on:
condition: service_healthy
ollama: &ollama-dependency
condition: service_healthy
postgres: &postgres-dependency
condition: service_healthy

networks:
r2r-network:
Expand Down Expand Up @@ -39,8 +41,6 @@ services:
- CONFIG_NAME=${CONFIG_NAME:-}
- CONFIG_PATH=${CONFIG_PATH:-}
- CLIENT_MODE=${CLIENT_MODE:-false}
depends_on:
- postgres
networks:
- r2r-network
healthcheck:
Expand All @@ -62,6 +62,8 @@ services:
- "traefik.http.middlewares.r2r-headers.headers.customrequestheaders.Access-Control-Allow-Methods=GET,POST,OPTIONS"
- "traefik.http.middlewares.r2r-headers.headers.customrequestheaders.Access-Control-Allow-Headers=DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization"
- "traefik.http.middlewares.r2r-headers.headers.customresponseheaders.Access-Control-Expose-Headers=Content-Length,Content-Range"
extra_hosts:
- host.docker.internal:host-gateway

r2r-dashboard:
image: emrgntcmplxty/r2r-dashboard:latest
Expand All @@ -76,23 +78,6 @@ services:
- "traefik.http.routers.dashboard.rule=PathPrefix(`/`)"
- "traefik.http.services.dashboard.loadbalancer.server.port=3000"

postgres:
image: pgvector/pgvector:pg16
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_DB=${POSTGRES_DBNAME:-postgres}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- r2r-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 5s
timeout: 5s
retries: 5
restart: on-failure

traefik:
image: traefik:v2.9
command:
Expand All @@ -109,6 +94,3 @@ services:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- r2r-network

volumes:
postgres_data:
Loading

0 comments on commit 916190b

Please sign in to comment.