Skip to content

Commit

Permalink
updated monkey patch to include ollama
Browse files Browse the repository at this point in the history
  • Loading branch information
bigabig committed Sep 25, 2024
1 parent efb543c commit 6b0baad
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backend_check_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
./setup-folders.sh
cp .env.example .env
chmod -R a+rwx backend_repo/ models_cache/ spacy_models/
python monkey_patch_docker_compose_for_backend_tests.py --disable_ray
python monkey_patch_docker_compose_for_backend_tests.py --disable_ray --disable_ollama
export GID=$(id -g)
docker compose -f compose-test.yml up -d --quiet-pull postgres
echo Waiting for containers to start...
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/backend_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
./setup-folders.sh
cp .env.example .env
chmod -R a+rwx backend_repo/ models_cache/ spacy_models/
python monkey_patch_docker_compose_for_backend_tests.py --disable_ray
python monkey_patch_docker_compose_for_backend_tests.py --disable_ray --disable_ollama
export GID=$(id -g)
docker compose -f compose-test.yml up -d --quiet-pull
echo Waiting for containers to start...
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-openapi-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
./setup-folders.sh
cp .env.example .env
chmod -R a+rwx backend_repo/ models_cache/ spacy_models/
python monkey_patch_docker_compose_for_backend_tests.py --disable_ray
python monkey_patch_docker_compose_for_backend_tests.py --disable_ray --disable_ollama
export GID=$(id -g)
docker compose -f compose-test.yml up -d --quiet-pull --wait --wait-timeout 300
echo Waiting for containers to start...
Expand Down
6 changes: 6 additions & 0 deletions docker/monkey_patch_docker_compose_for_backend_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@
data = yaml.safe_load(file)

disable_ray = len(sys.argv) > 1 and sys.argv[1] == "--disable_ray"
disable_ollama = len(sys.argv) > 2 and sys.argv[2] == "--disable_ollama"

if disable_ray:
# remove ray as it's too resource-intensive for CI
data["services"].pop("ray", None)

if disable_ollama:
# remove ray as it's too resource-intensive for CI
data["services"].pop("ollama", None)
data["services"]["celery-background-jobs-worker"]["depends_on"].pop("ollama", None)

for a in data["services"]:
data["services"][a].pop("deploy", None)

Expand Down

0 comments on commit 6b0baad

Please sign in to comment.