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

This commit is contained in:
davidmezzetti
2022-02-23 15:32:13 -05:00
parent 41e93f097c
commit fee93fdfbd
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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()"]
+1 -1
View File
@@ -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"]