Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add changes to run darwin locally #13

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
<host name='vespa-content-2.vespa-internal.darwin-dev.svc.cluster.local'>
<alias>content2</alias>
</host>
</hosts>
</hosts>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
<hosts>
<host name="index">
<alias>danswer-node</alias>
</host>
</hosts>
36 changes: 36 additions & 0 deletions backend/danswer/document_index/vespa/app_config/services-local.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8" ?>
<services version="1.0">
<container id="default" version="1.0">
<document-api/>
<search/>
<http>
<server id="default" port="8081"/>
</http>
<nodes>
<node hostalias="danswer-node" />
</nodes>
</container>
<content id="danswer_index" version="1.0">
<redundancy>1</redundancy>
<documents>
<!-- <document type="danswer_chunk" mode="index" /> -->
DOCUMENT_REPLACEMENT
</documents>
<nodes>
<node hostalias="danswer-node" distribution-key="0" />
</nodes>
<tuning>
<resource-limits>
<!-- Default is 75% but this can be increased for Dockerized deployments -->
<!-- https://docs.vespa.ai/en/operations/feed-block.html -->
<disk>0.75</disk>
</resource-limits>
</tuning>
<config name="vespa.config.search.summary.juniperrc">
<max_matches>3</max_matches>
<length>750</length>
<surround_max>350</surround_max>
<min_length>300</min_length>
</config>
</content>
</services>
9 changes: 8 additions & 1 deletion backend/danswer/document_index/vespa/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,10 +815,17 @@ def ensure_indices_exist(
os.getcwd(), "danswer", "document_index", "vespa", "app_config"
)
schema_file = os.path.join(vespa_schema_path, "schemas", "danswer_chunk.sd")
services_file = os.path.join(vespa_schema_path, "services.xml")
overrides_file = os.path.join(vespa_schema_path, "validation-overrides.xml")

if ENVIRONMENT in "LOCAL":
services_file = os.path.join(vespa_schema_path, "services-local.xml")
else:
services_file = os.path.join(vespa_schema_path, "services.xml")

if ENVIRONMENT in "DEV":
hosts_file = os.path.join(vespa_schema_path, "hosts-dev.xml")
elif ENVIRONMENT in "LOCAL":
hosts_file = os.path.join(vespa_schema_path, "hosts-local.xml")
else:
hosts_file = os.path.join(vespa_schema_path, "hosts.xml")

Expand Down
2 changes: 1 addition & 1 deletion deployment/docker_compose/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -355,4 +355,4 @@ volumes:
db_volume:
vespa_volume:
# Created by the container itself
model_cache_huggingface:
model_cache_huggingface:
Loading
Loading