/ docker / workflow / Dockerfile
Dockerfile
 1  # Set base image
 2  ARG BASE_IMAGE=neuml/txtai-cpu
 3  FROM $BASE_IMAGE
 4  
 5  # Copy configuration
 6  COPY config.yml .
 7  
 8  # Run local API instance to cache models in container
 9  RUN python -c "from txtai.api import API; API('config.yml', False)"
10  
11  # Run workflow. Requires two command line arguments: name of workflow and input elements
12  ENTRYPOINT ["python", "-c", "import sys; from txtai.api import API\nfor _ in API('config.yml').workflow(sys.argv[1], sys.argv[2:]): pass"]
13  CMD ["workflow"]