/ docker / schedule / 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  # Start application and wait for completion. Scheduled workflows can run indefinitely. 
12  ENTRYPOINT ["python", "-c", "from txtai.api import API; API('config.yml').wait()"]