Building the docker images
Base image
From the deployment directory, run:
docker build -t BASE_NAME:BASE_TAG -f cosmos.Dockerfile .
where BASE_NAME and BASE_TAG are specified name and tag.
Ingestion
The ingestion image builds the dependencies to deploy the ingestion pipeline.
Inside ingestion.Dockerfile, ensure that the FROM statement matches the BASE_NAME:BASE_TAG from above. If not, it will pull from docker hub. Then, from the root Cosmos directory run:
docker build -t INGEST_NAME:INGEST_TAG -f ingestion.Dockerfile .
where INGEST_NAME and INGEST_TAG are the specified name and tag.
Retrieval
Retrieval builds the retrieval image, which handles the semantic reranking model deployment.
Inside retrieval.Dockerfile, ensure that the FROM statement matches the BASE_NAME:BASE_TAG from above. If not, it will pull from docker hub. Then, from the root Cosmos directory run:
docker build -t RETRIEVAL_NAME:RETRIEVAL_TAG -f retrieval.Dockerfile .
where RETRIEVAL_NAME and RETRIEVAL_TAG are the specified name and tag.
Extraction
Extraction builds the extraction image, which currently handles the extractive QA model.
Inside retrieval.Dockerfile, ensure that the FROM statement matches the BASE_NAME:BASE_TAG from above. If not, it will pull from docker hub. Then, from the root Cosmos directory run:
docker build -t EXTRACTION_NAME:EXTRACTION_TAG -f extraction.Dockerfile .
where EXTRACTION_NAME and EXTRACTION_TAG are the specified name and tag.
API
docker build -t API_NAME:API_TAG -f api.Dockerfile .