Skip to content

Commit

Permalink
revert to only flash lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
mayankkom-dev committed Feb 14, 2024
1 parent b4ffd66 commit 37ebd71
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 31 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/terraform-lambda-ranker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,31 +61,31 @@ jobs:
python-version: '3.12'


# - name: Create and Install Dependencies for FlashRank
# id: poetry-install-flash
# run: |
# pip install poetry
# mkdir -p venv_deploy
# poetry config virtualenvs.create true
# poetry config virtualenvs.path venv_deploy
# poetry install
# venv_path=$(poetry env info --path)
# echo "Virtual Environment Path: $venv_path"
# echo "::set-output name=venv_path::$venv_path"

- name: Create and Install Dependencies for FastEmbed
id: poetry-install-fast
- name: Create and Install Dependencies for FlashRank
id: poetry-install-flash
run: |
pip install poetry
cp infrastructure/fast_lambda/poetry/pyproject.toml .
cp infrastructure/fast_lambda/poetry/poetry.lock .
mkdir -p venv_deploy2
mkdir -p venv_deploy
poetry config virtualenvs.create true
poetry config virtualenvs.path venv_deploy2
poetry config virtualenvs.path venv_deploy
poetry install
venv_path2=$(poetry env info --path)
echo "Virtual Environment Path2: $venv_path2"
echo "::set-output name=venv_path2::$venv_path2"
venv_path=$(poetry env info --path)
echo "Virtual Environment Path: $venv_path"
echo "::set-output name=venv_path::$venv_path"
# - name: Create and Install Dependencies for FastEmbed
# id: poetry-install-fast
# run: |
# pip install poetry
# cp infrastructure/fast_lambda/poetry/pyproject.toml .
# cp infrastructure/fast_lambda/poetry/poetry.lock .
# mkdir -p venv_deploy2
# poetry config virtualenvs.create true
# poetry config virtualenvs.path venv_deploy2
# poetry install
# venv_path2=$(poetry env info --path)
# echo "Virtual Environment Path2: $venv_path2"
# echo "::set-output name=venv_path2::$venv_path2"

# # Default install makes the installation in a venv in /home path
# # - name: Install dependencies
Expand Down Expand Up @@ -133,13 +133,13 @@ jobs:
if: github.event_name == 'push'
# run: terraform plan -var "image_tag=${{ env.IMAGE_TAG }}" -no-color
# run: terraform plan -var "site_packages_path=${{ env.SITE_PACKAGE_PATH }}" -var "site_packages_path2=${{ env.SITE_PACKAGE_PATH2 }}" -no-color
run: terraform plan -var "site_packages_path2=${{ env.SITE_PACKAGE_PATH2 }}" -no-color
run: terraform plan -var "site_packages_path=${{ env.SITE_PACKAGE_PATH }}" -no-color
# run: terraform plan -no-color # using latest for now
working-directory: ./infrastructure
env:
# IMAGE_TAG: ${{ steps.increment-git-tag.outputs.git-tag }}
# SITE_PACKAGE_PATH: ${{ steps.poetry-install.outputs.venv_path }}
SITE_PACKAGE_PATH2: ${{ steps.poetry-install-fast.outputs.venv_path2 }}
SITE_PACKAGE_PATH: ${{ steps.poetry-install.outputs.venv_path }}
# SITE_PACKAGE_PATH2: ${{ steps.poetry-install-fast.outputs.venv_path2 }}

- name: Terraform Plan Status
if: steps.plan.outcome == 'failure'
Expand All @@ -150,12 +150,12 @@ jobs:
if: github.event_name == 'push'
# run: terraform apply -var "image_tag=${{ env.IMAGE_TAG }}" -auto-approve
# run: terraform apply -var "site_packages_path=${{ env.SITE_PACKAGE_PATH }}" -var "site_packages_path2=${{ env.SITE_PACKAGE_PATH2 }}" -auto-approve
run: terraform apply -var "site_packages_path2=${{ env.SITE_PACKAGE_PATH2 }}" -auto-approve
run: terraform apply -var "site_packages_path=${{ env.SITE_PACKAGE_PATH }}" -auto-approve
# run: terraform apply -auto-approve
working-directory: ./infrastructure
env:
# IMAGE_TAG: ${{ steps.increment-git-tag.outputs.git-tag }}
# SITE_PACKAGE_PATH: ${{ steps.poetry-install-flash.outputs.venv_path }}
SITE_PACKAGE_PATH2: ${{ steps.poetry-install-fast.outputs.venv_path2 }}
SITE_PACKAGE_PATH: ${{ steps.poetry-install-flash.outputs.venv_path }}
# SITE_PACKAGE_PATH2: ${{ steps.poetry-install-fast.outputs.venv_path2 }}


9 changes: 5 additions & 4 deletions infrastructure/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module "lambda_module_fast" {
source = "./fast_lambda"
site_packages_path2 = var.site_packages_path2
module "lambda_module_flash" {
source = "./flash_lambda"
site_packages_path = var.site_packages_path
# s3_bucket_name = "my-s3-bucket"
}
}

0 comments on commit 37ebd71

Please sign in to comment.