pod.portfield of your API configuration (default: 8080).
/). The payload will be a JSON-encoded array representing one batch, and the
Content-Typeheader will be set to "application/json". In addition, the job's ID will be passed in via the "X-Cortex-Job-ID" header.
/on-job-complete. It is not necessary for your web server to handle requests to
/on-job-complete(404 errors will be ignored).
config), the entire job specification is available at
/cortex/spec/job.jsonin your API containers' filesystems.
tiangolo/uvicorn-gunicorn-fastapibehaves this way). Readiness checks ensure that traffic is not sent into your web server before it's ready to handle them.
tcp_socket(see API configuration for usage instructions). A simple and often effective approach is to add a route to your web server (e.g.
/healthz) which responds with status code 200, and configure your readiness probe accordingly:
/mntdirectory is mounted to each container's filesystem, and is shared across all containers.
/cortex/client/cli.yaml, which is configured to connect to the cluster. In addition, the
CORTEX_CLI_CONFIG_DIRenvironment variable is set to
/cortex/clientby default. Therefore, no additional configuration is required to use the CLI or Python client (which can be instantiated via
<api_name>is the name of the Batch API you are making a request to.
hello-worldrunning in the cluster, you can make a request to it from a different API in Python by using: