From d56c9206e6e5ab75c3d081184f47a44b62527823 Mon Sep 17 00:00:00 2001 From: David Giffin Date: Sat, 3 Aug 2024 18:24:11 -0400 Subject: [PATCH] Makign image for releae docs api --- .github/workflows/build-and-push-images.yml | 85 +-------------------- .release/application_template.yaml | 44 +---------- 2 files changed, 5 insertions(+), 124 deletions(-) diff --git a/.github/workflows/build-and-push-images.yml b/.github/workflows/build-and-push-images.yml index e535efc6..06c8d7f8 100644 --- a/.github/workflows/build-and-push-images.yml +++ b/.github/workflows/build-and-push-images.yml @@ -9,7 +9,7 @@ concurrency: on: push: - branches: [release-docker-build] + branches: [release-docs] paths-ignore: - '**.md' - 'images/**/*' @@ -77,93 +77,16 @@ jobs: type=ref,event=tag type=ref,event=pr - - name: "Build and push multi-platform Docker image: genai-stack/pull-model" + - name: "Build and push multi-platform Docker image: genai-stack/release-api" uses: docker/build-push-action@v5 with: context: . - file: ./pull_model.Dockerfile + file: ./release_docs_api.Dockerfile push: true platforms: linux/amd64,linux/arm64 # tags: ${{ steps.meta.outputs.tags }} - tags: releaseai/genai-stack-pull-model:latest + tags: releaseai/genai-stack-release-api:latest labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max - - name: "Build and push multi-platform Docker image: genai-stack/loader" - uses: docker/build-push-action@v5 - with: - context: . - file: ./loader.Dockerfile - push: true - platforms: linux/amd64,linux/arm64 - # tags: ${{ steps.meta.outputs.tags }} - tags: releaseai/genai-stack-loader:latest - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: "Build and push multi-platform Docker image: genai-stack/custom-loader" - uses: docker/build-push-action@v5 - with: - context: . - file: ./custom_loader.Dockerfile - push: true - platforms: linux/amd64,linux/arm64 - # tags: ${{ steps.meta.outputs.tags }} - tags: releaseai/genai-stack-custom-loader:latest - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: "Build and push multi-platform Docker image: genai-stack/bot" - uses: docker/build-push-action@v5 - with: - context: . - file: ./bot.Dockerfile - push: true - platforms: linux/amd64,linux/arm64 - # tags: ${{ steps.meta.outputs.tags }} - tags: releaseai/genai-stack-bot:latest - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: "Build and push multi-platform Docker image: genai-stack/pdf-bot" - uses: docker/build-push-action@v5 - with: - context: . - file: ./pdf_bot.Dockerfile - push: true - platforms: linux/amd64,linux/arm64 - # tags: ${{ steps.meta.outputs.tags }} - tags: releaseai/genai-stack-pdf-bot:latest - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: "Build and push multi-platform Docker image: genai-stack/api" - uses: docker/build-push-action@v5 - with: - context: . - file: ./api.Dockerfile - push: true - platforms: linux/amd64,linux/arm64 - # tags: ${{ steps.meta.outputs.tags }} - tags: releaseai/genai-stack-api:latest - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: "Build and push multi-platform Docker image: genai-stack/front-end" - uses: docker/build-push-action@v5 - with: - context: . - file: ./front-end.Dockerfile - push: true - platforms: linux/amd64,linux/arm64 - # tags: ${{ steps.meta.outputs.tags }} - tags: releaseai/genai-stack-front-end:latest - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max diff --git a/.release/application_template.yaml b/.release/application_template.yaml index a091c4ab..f52677d3 100644 --- a/.release/application_template.yaml +++ b/.release/application_template.yaml @@ -1,7 +1,5 @@ --- execution_type: server -context: release-ai -domain: ai-playground.releaseapp.io repo_name: awesome-release/genai-stack hostnames: - api: api-release-docs-rag-${env_id}.${domain} @@ -30,11 +28,7 @@ parameters: optional: true services: - name: api - image: awesome-release/genai-stack/api - build: - context: "." - dockerfile: release_docs_api.Dockerfile - has_repo: true + image: awesome-release/genai-stack/release-api volumes: [] command: - uvicorn @@ -157,38 +151,7 @@ services: mount_path: "/dev/shm" - claim: models mount_path: "/root/.ollama" -- name: gitbook-ingest - build: - context: "." - dockerfile: release_docs_gitbook_ingest.Dockerfile - has_repo: true jobs: -- name: gitbook-ingest - from_services: gitbook-ingest - command: - - python - - release-docs-gitbook-ingest.py - envs: - - key: CHROMA_HOST - value: chroma - - key: CHROMA_PORT - value: 8000 - - key: OLLAMA_BASE_URL - value: http://ollama:11434 - - key: LANGCHAIN_API_KEY - value: NONE - - key: LANGCHAIN_PROJECT - value: LANGCHAIN_PROJECT - - key: LANGCHAIN_ENDPOINT - value: https://api.smith.langchain.com - - key: LANGCHAIN_TRACING_V2 - value: 'false' - memory: - limits: 4Gi - requests: 100Mi - cpu: - limits: 2000m - requests: 100m - name: pull-model image: releaseai/genai-stack-pull-model command: @@ -219,11 +182,6 @@ workflows: - step: services-0 tasks: - services.api -- name: gitbook-ingest - parallelize: - - step: gitbook-ingest - tasks: - - jobs.gitbook-ingest - name: teardown parallelize: - step: remove-environment