├── app:
│ ├── data
│ ├── utils
│ └── main.py
├── helm-charts:
│ ├── jaeger-tracing
│ ├── model-serving
│ ├── monitoring
│ └── nginx-ingress
├── notebook:
│ ├── resnet-50.ipynb
│ └── visualize.ipynb
├── terraform
│ ├── main.tf
│ ├── outputs.tf
│ ├── provider.tf
│ ├── README.md
│ ├── ssh.tf
│ └── variables.tf
├── docker-compose.yaml
├── dockerfile
└── requirements.txt
Motorbike Image to classify:
conda create -n my_env python==3.9
conda activate my_env
pip install -r requirements.txt
cd ./app/
uvicorn main:app --host 0.0.0.0 --port 30000
*** If you already have Docker Engine in your local machine, just execute 1 command:
docker compose -f docker-compose.yaml up -d
*** When model loading , use command to check
docker image ls
docker logs img_id
sudo curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
- Setup your Azure project:
- Initialize Azure account:
az login
cd terraform # Navigate to terraform folder
terraform plan # Preview cluster plan
terraform apply # Create cluster
2.3 Switch to your AKS cluster environment (using kubectl)
kubectx your_aks_cluster
kubectl create ns nginx-ingress # Nginx Ingress Controller
kubectl create ns model-serving
2.5 Deploy Nginx Ingress Controller with Helm-chart
helm upgrade --install nginx-ingress helm-charts/nginx-ingress -n nginx-ingress
helm upgrade --install nginx-ingress helm-charts/model-serving -n model-serving
kubectl get svc --all-namespaces # Listing all services & finding your nginx External IP
sudo vim /etc/hosts # Editting hosts_file with Vim
your_nginx_externalIP
your_nginx-ingress_host cbp.com # Updated content
2.8 Access application at above address http://cbp.com/docs
Because I'm using a free Student Subscription, I don't have enough memory to pull the image size. Instead of running it on the cloud, I am running it on minikube.