mirror of
https://github.com/neuml/txtai.git
synced 2026-10-11 21:39:55 +00:00
Add flag to disable loading index data in API, closes #230
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()"]
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user