💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Add flag to disable loading index data in API, closes #230
davidmezzettifee93fdfbdd9
diff --git a/docker/api/Dockerfile b/docker/api/Dockerfileindex 13dced0c..2899cbb9 100644--- a/docker/api/Dockerfile+++ b/docker/api/Dockerfile@@ -6,7 +6,7 @@ FROM $BASE_IMAGECOPY config.yml .# Run local API instance to cache models in container-RUN python -c "from txtai.api import API; API('config.yml')"+RUN python -c "from txtai.api import API; API('config.yml', False)"# Start server and listen on all interfacesENV CONFIG "config.yml"diff --git a/docker/aws/Dockerfile b/docker/aws/Dockerfileindex 704f1f5e..3b4c579c 100644--- a/docker/aws/Dockerfile+++ b/docker/aws/Dockerfile@@ -12,7 +12,7 @@ RUN pip install awslambdaric mangumCOPY config.yml .# Run local API instance to cache models in container-RUN python -c "from txtai.api import API; API('config.yml')"+RUN python -c "from txtai.api import API; API('config.yml', False)"# Copy applicationCOPY $APP ./app.pydiff --git a/docker/schedule/Dockerfile b/docker/schedule/Dockerfileindex d48f3b8f..03fd5781 100644--- a/docker/schedule/Dockerfile+++ b/docker/schedule/Dockerfile@@ -6,7 +6,7 @@ FROM $BASE_IMAGECOPY config.yml .# Run local API instance to cache models in container-RUN python -c "from txtai.api import API; API('config.yml')"+RUN python -c "from txtai.api import API; API('config.yml', False)"# Start application and wait for completion. Scheduled workflows can run indefinitely.ENTRYPOINT ["python", "-c", "from txtai.api import API; API('config.yml').wait()"]diff --git a/docker/workflow/Dockerfile b/docker/workflow/Dockerfileindex 3b23b2b7..a906db56 100644--- a/docker/workflow/Dockerfile+++ b/docker/workflow/Dockerfile@@ -6,7 +6,7 @@ FROM $BASE_IMAGECOPY config.yml .# Run local API instance to cache models in container-RUN python -c "from txtai.api import API; API('config.yml')"+RUN python -c "from txtai.api import API; API('config.yml', False)"# Run workflow. Requires two command line arguments: name of workflow and input elementsENTRYPOINT ["python", "-c", "import sys; from txtai.api import API\nfor _ in API('config.yml').workflow(sys.argv[1], sys.argv[2:]): pass"]