Skip to content

Commit

Permalink
Vespa app package cleanup (#761)
Browse files Browse the repository at this point in the history
Clean up application packages for local Vespa deployment, and unused DIND scripts
  • Loading branch information
farshidz authored Feb 12, 2024
1 parent b243244 commit 5c1a218
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 343 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit_test_200gb_CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
apt-get install zip -y
zip -r vespa_tester_app.zip services.xml schemas
# Deploy dummy application with test schema
# Deploy application with test schema
curl --header "Content-Type:application/zip" --data-binary @vespa_tester_app.zip http://localhost:19071/application/v2/tenant/default/prepareandactivate
# wait for vespa to start (document url):
Expand Down
2 changes: 1 addition & 1 deletion run_marqo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ elif [ -z "$VESPA_QUERY_URL" ] && [ -z "$VESPA_DOCUMENT_URL" ] && [ -z "$VESPA_C
if echo "$RESPONSE" | grep -q '"error-code":"NOT_FOUND"'; then
echo "Marqo did not find an existing vector store. Setting up vector store..."
# Deploy a dummy application package
vespa deploy /app/scripts/vespa_dummy_app --wait 300 >/dev/null 2>&1
vespa deploy /app/scripts/vespa_local --wait 300 >/dev/null 2>&1

until curl -f -X GET http://localhost:8080 >/dev/null 2>&1; do
echo " Waiting for vector store to be available..."
Expand Down
201 changes: 0 additions & 201 deletions scripts/dind_setup/LICENSE

This file was deleted.

24 changes: 0 additions & 24 deletions scripts/dind_setup/deps/logger.sh

This file was deleted.

20 changes: 0 additions & 20 deletions scripts/dind_setup/deps/modprobe

This file was deleted.

6 changes: 0 additions & 6 deletions scripts/dind_setup/deps/supervisor/dockerd.conf

This file was deleted.

60 changes: 0 additions & 60 deletions scripts/dind_setup/setup_dind.sh

This file was deleted.

Binary file removed scripts/vespa_dummy_app.zip
Binary file not shown.
4 changes: 0 additions & 4 deletions scripts/vespa_dummy_app/schemas/vespa_dummy_schema.sd

This file was deleted.

20 changes: 0 additions & 20 deletions scripts/vespa_dummy_app/services.xml

This file was deleted.

11 changes: 5 additions & 6 deletions src/marqo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,16 @@ pip install -r requirements.dev.txt
3. Pull and run the Vespa docker image
```bash
docker run --detach --name vespa --hostname vespa-tutorial \
--publish 8080:8080 --publish 19071:19071 --publish 19092:19092 \
--publish 8080:8080 --publish 19071:19071 \
vespaengine/vespa:latest
```

4. Deploy a dummy application for Vespa docker image by using the provided `scripts/vespa_dummy_app.zip` file and `curl`
4. Configure Vespa by deploying to the provided application package `scripts/vespa_local`
```bash
curl --header "Content-Type:application/zip" --data-binary @scripts/vespa_dummy_app.zip http://localhost:19071/application/v2/tenant/default/prepareandactivate
(cd scripts/vespa_local && zip -r - * | curl --header "Content-Type:application/zip" --data-binary @- http://localhost:19071/application/v2/tenant/default/prepareandactivate)
```

Up to now. you should have a running Vespa docker image and a dummy application deployed to it.
You can check this by visiting `http://localhost:8080` in your browser.
You can verify that Vespa has been set up correctly by visiting `http://localhost:8080` in your browser.

### Option A. Run the Marqo application locally (outside of docker) through IDE
Now you can run Marqo locally through your IDE (e.g. PyCharm) by following the steps below.
Expand Down Expand Up @@ -66,7 +65,7 @@ export MARQO_ENABLE_BATCH_APIS=true
export MARQO_LOG_LEVEL=debug
export VESPA_CONFIG_URL=http://localhost:19071
export VESPA_DOCUMENT_URL=http://localhost:8080
export ESPA_QUERY_URL=http://localhost:8080
export VESPA_QUERY_URL=http://localhost:8080
export PYTHONPATH="${PYTHONPATH}:$(pwd)/src"
cd src/marqo/tensor_search
uvicorn api:app --host 0.0.0.0 --port 8882 --reload
Expand Down

0 comments on commit 5c1a218

Please sign in to comment.