Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Add flag to disable loading index data in API, closes #230

davidmezzettifee93fdfbdd9
diff --git a/docker/api/Dockerfile b/docker/api/Dockerfile
index 13dced0c..2899cbb9 100644
--- a/docker/api/Dockerfile
+++ b/docker/api/Dockerfile
@@ -6,7 +6,7 @@ FROM $BASE_IMAGE
COPY 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 interfaces
ENV CONFIG "config.yml"
diff --git a/docker/aws/Dockerfile b/docker/aws/Dockerfile
index 704f1f5e..3b4c579c 100644
--- a/docker/aws/Dockerfile
+++ b/docker/aws/Dockerfile
@@ -12,7 +12,7 @@ RUN pip install awslambdaric mangum
COPY 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 application
COPY $APP ./app.py
diff --git a/docker/schedule/Dockerfile b/docker/schedule/Dockerfile
index d48f3b8f..03fd5781 100644
--- a/docker/schedule/Dockerfile
+++ b/docker/schedule/Dockerfile
@@ -6,7 +6,7 @@ FROM $BASE_IMAGE
COPY 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/Dockerfile
index 3b23b2b7..a906db56 100644
--- a/docker/workflow/Dockerfile
+++ b/docker/workflow/Dockerfile
@@ -6,7 +6,7 @@ FROM $BASE_IMAGE
COPY 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 elements
ENTRYPOINT ["python", "-c", "import sys; from txtai.api import API\nfor _ in API('config.yml').workflow(sys.argv[1], sys.argv[2:]): pass"]