Using Automated ML workflows on dedicated servers provides a reliable and high-performance environment for training and deploying machine learning models. Dedicated servers are the best choice for ML workflows because they ensure consistent computing power, which avoids slowdowns. They also offer better scalability for large datasets and complex models.
System Prerequisites for Automated ML Workflows on Dedicated Servers
The automated ML workflow we want to set up in this guide has several key components, including:
MinIO (S3) for storing datasets and artifacts.
PostgreSQL for metadata management.
MLflow for experiment tracking and model registry.
Apache Airflow for automation.
DVC for data versioning.
Optionally, NVIDIA Triton can be added for model serving.
Prometheus, Grafana, and cAdvisor handle monitoring.
Before setting up this workflow, you need to prepare your operating system by configuring firewall rules, installing Docker, and other necessary steps.
Install Required Packages and Configure Firewall Rules
Run the system upgrade and install the required packages on your system with the following commands:
Install NVIDIA Driver and Container Toolkit for GPU Servers
If you have servers with GPUs, you must install the NVIDIA driver with the container toolkit. Install the proper driver on your system with the commands below:
Create Main Services With Docker Compose for ML Workflow
You need to create an env file that sets environment variables to configure connections between the services, including PostgreSQL, MLflow, and MinIO. This allows MLflow to store experiments in PostgreSQL and artifacts in MinIO.
Create a working directory with the command below:
Bash
sudomkdir-pml-platform
Create the env file in your working directory by using the command below:
This Docker Compose file creates a complete ML platform with experiment tracking and artifact storage. You can check the official Docker Compose documentation for detailed configuration syntax, service options, and advanced networking setups.
Switch to the compose directory and run Docker Compose with the following commands:
At this point, you must configure MinIO object storage to store MLflow artifacts. It creates a dedicated bucket where MLflow will save experiment results, models, and other machine learning artifacts for tracking and versioning.
Download and install the MinIO client system-wide on your server with the following commands:
You can list the bucket with the following command:
Bash
mclslocal
You can access the MinIO console by navigating to the URL below:
http://server_ip:9001
Also, access the MLflow Web UI with:
http://server_ip:5000
Set up DVC with MinIO for Data Versioning
Now you must configure DVC (Data Version Control) to use MinIO as remote storage for datasets and models. This will enable version control for large data files while storing them efficiently in S3-compatible storage.
Run the following commands from your repo root to set up DVC and configure MinIO as remote storage for DVC files:
Bash
gitinitpipxinstalldvc2>/dev/null||python3-mpipinstall--userdvc[s3]dvcinit# Configure S3 remote (MinIO)dvcremoteadd-ds3remotes3://${MLFLOW_ARTIFACT_BUCKET}/dvcdvcremotemodifys3remoteendpointurlhttp://127.0.0.1:9000dvcremotemodifys3remoteaccess_key_id${MINIO_ROOT_USER}dvcremotemodifys3remotesecret_access_key${MINIO_ROOT_PASSWORD}dvcremotemodifys3remoteuse_sslfalsegitadd.dvc.gitignoregitcommit-m"Init DVC with MinIO remote"
Then, track and version a dataset with DVC with the following commands:
Bash
mkdir-pdata/raw&&cp/path/to/your.csvdata/raw/dvcadddata/raw/your.csvgitadddata/raw/your.csv.dvcgitcommit-m"Track dataset with DVC"dvcpush
ML Model Training with MLflow Experiment Tracking
In this step, we will show you machine learning training with comprehensive MLflow logging. It includes a complete workflow for training a classifier while automatically tracking parameters, metrics, and models to the MLflow server for experiment management and reproducibility.
Create the requirements file with the following command:
Bash
sudonanoml-platform/ml/requirements.txt
Add the following variables to the file:
numpypandasscikit-learnmlflow==2.14.1boto3
Then, create the train file with the following command:
Bash
sudonanoml-platform/ml/train.py
Add the following config to the file:
Python
1import os2import mlflow3import mlflow.sklearn4import pandas as pd5from sklearn.model_selection import train_test_split6from sklearn.linear_model import LogisticRegression7from sklearn.metrics import f1_score89MLFLOW_TRACKING_URI = os.environ.get("MLFLOW_TRACKING_URI","http://localhost:5000")10mlflow.set_tracking_uri(MLFLOW_TRACKING_URI)11mlflow.set_experiment("demo-exp")1213defmain():14# Load data (could be pulled with DVC)15 df = pd.read_csv("data/raw/your.csv")16 X = df.drop(columns=["label"])17 y = df["label"]1819 Xtr, Xte, ytr, yte =train_test_split(X, y, test_size=0.2, random_state=42)2021with mlflow.start_run():22 params ={"C":1.0,"max_iter":200}23 model =LogisticRegression(**params).fit(Xtr, ytr)24 preds = model.predict(Xte)25 f1 =f1_score(yte, preds, average="macro")2627 mlflow.log_params(params)28 mlflow.log_metric("f1_macro", f1)29 mlflow.sklearn.log_model(model, artifact_path="model")3031print(f"F1 (macro): {f1:.4f}")3233if __name__ =="__main__":34main()
Now you can run the training model locally in a Python environment shell:
From the MLflow Web UI, you can verify the model that appears under the run’s artifacts.
ML Pipeline Automation with Apache Airflow
At this point, you can automate machine learning workflows using Apache Airflow. This setup will create a complete automation system that can pull data with DVC, run training jobs, and log experiments to MLflow, all managed through scheduled pipelines with monitoring and retry capabilities.
Create the Airflow requirements file with the command below:
CI/CD Pipeline for ML Platform with GitHub Actions
You can also set up a GitHub Actions workflow, which automates testing, containerization, and deployment of machine learning code. It runs tests, builds Docker images, pushes to a container registry, and can optionally trigger Airflow pipelines.
Create the GitHub Actions file with the following command:
ML Model Serving with NVIDIA Triton Inference Server
You can deploy machine learning models for high-performance inference using NVIDIA Triton. It provides a production-ready serving solution with support for multiple frameworks such as TensorFlow, PyTorch, ONNX, and optimized GPU inference through a scalable inference server.
You can start an NVIDIA Triton Inference Server with GPU support by using the following commands:
Bash
mkdir-pserving/models# Put your model repo under serving/models/<model_name>/ (config.pbtxt inside)dockerrun-d--nametriton\--gpusall\-p8000:8000-p8001:8001-p8002:8002\-v$PWD/serving/models:/models\nvcr.io/nvidia/tritonserver:24.05-py3\tritonserver--model-repository=/models
There is an alternative method with a simple model served with FastAPI and Docker. It creates RESTful APIs for inference that can be containerized and deployed behind NGINX, which offers a straightforward solution for production deployment without complex model conversion.
Tip: For a deeper guide on configuring and optimizing PyTorch inference environments on virtual private servers, check PyTorch Model Inference Setup on VPS.
ML Platform Monitoring with Prometheus and Grafana
Monitoring the ML workflow is an essential task. This setup collects metrics from containers, hosts, and services using Prometheus, visualizes them in Grafana dashboards, and monitors resource usage, which gives you full visibility into system performance and model serving metrics.
Create the monitoring Compose file with the command below:
Access the Grafana dashboard with the following URL and change the default admin credentials:
http://server_ip:3000
You can connect Prometheus as your data source, and import pre-built dashboards to monitor Docker containers, host resources, and system performance in real time.
That's it, you are done with setting up Automated ML workflows on dedicated servers.
Conclusion
Building automated ML workflows on dedicated servers gives you the power to manage the entire ML platform from data collection to production deployment, with full visibility, reproducibility, and scalability. By using tools like Docker, Airflow, MLflow, DVC, and Prometheus, you create a powerful foundation for continuous experimentation and model delivery.
This tutorial was tested and deployed on PerLod Hosting, which offered optimized VPS and dedicated GPU servers for machine learning, AI automation, and high-performance computing.
We hope you enjoy this guide. Subscribe to our X and Facebook channels to get the latest updates and articles in machine learning.
An automated ML workflow uses tools like Airflow, MLflow, and DVC to create repeatable processes from data to deployment, which reduces errors and speeds up experimentation.
A dedicated server gives you full control over resource allocation, data governance, and cost optimization, which is perfect for ML services.
MLflow manages experiments, model metrics, and artifact storage, while DVC tracks dataset and model versions linked to Git commits.
We use cookies to run PerLod and to understand how the site is used. You can accept everything, or open Manage to turn individual categories off. Cookie policy.