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 server and listen on all interfaces 12 ENV CONFIG "config.yml" 13 ENTRYPOINT ["uvicorn", "--host", "0.0.0.0", "txtai.api:app"]