For Macs, maxOS >= 13.6.6 is required. Apply Silicon devices (M1) must use Rosetta terminal. You can verify, your terminals architecture by running arch. It should print i386 for Rosetta terminal.

Install via pip:

pip install magemaker

Cloud Account Setup

AWS Configuration

  • Follow this detailed guide for setting up AWS credentials: AWS Setup Guide

Once you have your AWS credentials, you can configure Magemaker by running:

magemaker --cloud aws

It will prompt you for aws credentials and set up the necessary configurations.

GCP (Vertex AI) Configuration

  • Follow this detailed guide for setting up GCP credentials: GCP Setup Guide

once you have your GCP credentials, you can configure Magemaker by running:

magemaker --cloud gcp

Azure Configuration

  • Follow this detailed guide for setting up Azure credentials: GCP Setup Guide

Once you have your Azure credentials, you can configure Magemaker by running:

magemaker --cloud azure

All three cloud providers

If you have configured all three cloud providers, you can verify your configuration by running:

magemaker --cloud all

Required Config File

By default, Magemaker will look for a .env file in your project root with the following variables based on which cloud provider(s) you plan to use:

# AWS Configuration
AWS_ACCESS_KEY_ID="your-access-key"      # Required for AWS
AWS_SECRET_ACCESS_KEY="your-secret-key"   # Required for AWS
SAGEMAKER_ROLE="arn:aws:iam::..."        # Required for AWS

# GCP Configuration
PROJECT_ID="your-project-id"             # Required for GCP
GCLOUD_REGION="us-central1"              # Required for GCP

# Azure Configuration
AZURE_SUBSCRIPTION_ID="your-sub-id"      # Required for Azure
AZURE_RESOURCE_GROUP="ml-resources"      # Required for Azure
AZURE_WORKSPACE_NAME="ml-workspace"      # Required for Azure
AZURE_REGION="eastus"                    # Required for Azure

# Optional configurations
HUGGING_FACE_HUB_KEY="your-hf-token"    # Required for gated HF models like llama
Never commit your .env file to version control!

For gated models like llama-3.1 from Meta, you might have to accept terms of use for model on hugging face and adding Hugging face token to the environment are necessary for deployment to go through.

Best Practices

  1. Resource Management

    • Monitor quota limits
    • Clean up unused resources
    • Set up cost alerts
  2. Environment Management

    • Use separate configurations for dev/prod
    • Regularly rotate access keys
    • Use environment-specific roles
  3. Security

    • Follow principle of least privilege
    • Use service accounts where possible
    • Enable audit logging

Troubleshooting

Common configuration issues:

  1. AWS Issues

    • Check IAM role permissions
    • Verify SageMaker quota
    • Confirm region settings
  2. GCP Issues

    • Verify service account permissions
    • Check Vertex AI API enablement
    • Confirm project ID
  3. Azure Issues

    • Check resource provider registration status:
      az provider show -n Microsoft.MachineLearningServices
      az provider show -n Microsoft.ContainerRegistry
      az provider show -n Microsoft.KeyVault
      az provider show -n Microsoft.Storage
      az provider show -n Microsoft.Insights
      az provider show -n Microsoft.ContainerService
      az provider show -n Microsoft.PolicyInsights
      az provider show -n Microsoft.Cdn
      
    • Verify workspace access
    • Confirm subscription status
    • Ensure all required providers are registered