- Update
config.yaml
- Update
schema.yaml
[For validation] - Update
params.yaml
[For training] - Update the entity
- Update the configuration manager in
src/config
- Update the components
- Update the pipeline
- Update the
main.py
- Update the
app.py
git clone https://github.com/Wilsven/mlops-with-mlflow.git
conda create -n <ENV NAME> python=3.11 -y
conda activate <ENV NAME>
pip install -r requirements.txt
python app.py
π MLflow
πΆ Dagshub
MLFLOW_TRACKING_URI=https://dagshub.com/your_username/your_project_name.mlflow \
MLFLOW_TRACKING_USERNAME=your_username \
MLFLOW_TRACKING_PASSWORD=your_token \
python script.py
Run the following commands to export as environment variables:
export MLFLOW_TRACKING_URI=https://dagshub.com/your_username/your_project_name.mlflow
export MLFLOW_TRACKING_USERNAME=your_username
export MLFLOW_TRACKING_PASSWORD=your_token
Or you can create an .env
file in the root directory:
MLFLOW_TRACKING_URI=https://dagshub.com/your_username/your_project_name.mlflow
MLFLOW_TRACKING_USERNAME=your_username
MLFLOW_TRACKING_PASSWORD=your_token
Edit the .env.example
file and rename it to env
when done.
# Specific access
1. EC2 access : It is a virtual machine
2. ECR: Elastic Container registry to save your docker image in AWS
# Description
1. Build docker image of the source code
2. Push your docker image to ECR
3. Launch Your EC2
4. Pull your image from ECR in EC2
5. Lauch your docker image in EC2
# Policy
1. AmazonEC2ContainerRegistryFullAccess
2. AmazonEC2FullAccess
- Save the URI: 566373416292.dkr.ecr.ap-south-1.amazonaws.com/mlproj
# Optional
sudo apt-get update -y
sudo apt-get upgrade -y
# Required
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker ubuntu
newgrp docker
Settings > Actions > Runner > New self-hosted runner > Select Linux > Execute commands one by one in your Virtual Machine
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION
AWS_ECR_LOGIN_URI
ECR_REPOSITORY_NAME
- Production Grade
- Experiment tracking
- Loging
- Tagging