Algorithmic translation of text from one language to another is called Machine Translation (MT). In this repo we have a simple MT service that translates English text to German.
Note that you might have to use different commands on a different system.
wget
unzip
- Docker
- Kubernetes
This service requires a machine learning model to work. You have to download the models from here. Alternatively, you can download the model using the following scripts.
# Download the zip file
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1HZY0LNzSSlhbBUk-K71re6lkRId5bNyw' -O model.zip
# Unzip the model files
unzip model.zip
Now you have to build the docker image and run a it with the downloaded model
cd <project root>
# Build the image
docker build -t ns-nmt:latest .
# Run a docker container to serve the translation model
docker run --rm -v ${PWD}/model:/model -e NS_NMT_MODEL_DIR=/model -p 8000:8000 ns-nmt poetry run uvicorn main:app --host 0.0.0.0 --port 8000
Go to localhost:8000/docs
Your task is to develop a CI/CD pipeline and deploy this service on a K8 cluster. Please keep the answers short and crisp. The following are subtasks/questions:
-
CI/CD Pipeline: You have to create a CI/CD pipeline to deploy this service on a K8 cluster. You can use any automation tool, e.g., CircleCI, AzurePipelines, Github Actions, etc. to do so. You can do everything with a free Azure/AWS account. We recommend using Azure.
-
Share the API URL with us
-
How can you scale this service to handle 2000 requests per second
-
What tools can be used to monitor the service throughput?
-
What tools can be used to load-test the service?
-
What strategy did you use to make the model files accessible to all services?
-
What will be your strategy for AB testing, given a new model file?
-
[BONUS] What will be your strategy to setup a staging and dev environment, and how you automate the deployment process for each environment?
- Fork/copy this repo
- Add your CI pipeline
- Write answers to the above question in the Readme
- Share the repo link with us and add
dashayushman
as a contributor - Make sure to keep the solution repo private