mcpField
A
azure-ml-foundry-workspace

azure-ml-foundry-workspace

github.com/josiahsiegelクラウド・DevOps59100 回インストール19 週間前に更新
リポジトリ

azure-ml-foundry-workspace について

Azure Machine Learning Workspace と Azure AI Foundry を扱うエンジニアや管理者向けの詳細なリファレンスです。ワークスペース構成、ネットワーク、コンピューティング、デプロイ、ID、CLI と PowerShell、Terraform、トラブルシューティングを扱います。

主な機能

  1. 01ワークスペース構成とネットワーク
  2. 02コンピューティングとエンドポイントのデプロイ
  3. 03ID、ストレージ、レジストリのガイド
  4. 04az ml CLI と PowerShell のリファレンス
  5. 05Terraform による構成ガイド
  6. 06ログ確認とトラブルシューティング

活用シーン

  1. 01ワークスペースのプライベートネットワークを計画
  2. 02トレーニングや推論向けのコンピューティングを選択
  3. 03オンラインまたはバッチのモデルエンドポイントをデプロイ
  4. 04Terraform でワークスペースのインフラを自動構成

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/josiahsiegel/claude-plugin-marketplace --skill azure-ml-foundry-workspace

インストール後、Claude Code で/azure-ml-foundry-workspaceを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

references/
cli-powershell.md
compute.md
endpoints.md
identities-acr-storage.md
networking.md
terraform.md
troubleshooting.md

詳細

Azure Machine Learning Workspace / Azure AI Foundry - 詳細な総合リファレンス

Azure Machine Learning Workspace(Azure AI Foundry)のあらゆる側面を網羅する包括的なリファレンスです。アーキテクチャ、ネットワーク、プライベートエンドポイント、コンピューティングクラスター、エンドポイントのデプロイ、マネージド ID、ACR の統合、ストレージアカウント、すべての CLI コマンドと PowerShell コマンド、ログの読み取り、デバッグ、Terraform との統合を扱います。


1. アーキテクチャと基本概念

ワークスペースのリソース階層
Azure Subscription
  └── Resource Group
        ├── Azure ML Workspace (Microsoft.MachineLearningServices/workspaces)
        │     ├── Dependent Resources (auto-created or BYO)
        │     │     ├── Azure Storage Account (default datastore)
        │     │     ├── Azure Key Vault (secrets, connection strings)
        │     │     ├── Azure Application Insights (telemetry)
        │     │     └── Azure Container Registry (Docker images for environments)
        │     ├── Compute Targets
        │     │     ├── Compute Instances (dev/test VMs)
        │     │     ├── Compute Clusters (AmlCompute - training)
        │     │     ├── Serverless Compute (on-demand)
        │     │     ├── Kubernetes Compute (AKS / Arc-enabled)
        │     │     └── Attached Compute (Databricks, HDInsight, VMs)
        │     ├── Data Assets (versioned references to data)
        │     ├── Datastores (connections to storage)
        │     ├── Environments (Docker + conda specs)
        │     ├── Models (registered trained models)
        │     ├── Endpoints
        │     │     ├── Managed Online Endpoints (real-time)
        │     │     ├── Kubernetes Online Endpoints (BYO infra)
        │     │     ├── Batch Endpoints (large-scale scoring)
        │     │     └── Serverless Endpoints (MaaS - pay-per-token)
        │     ├── Jobs (training runs, pipelines, sweeps)
        │     ├── Components (reusable pipeline steps)
        │     ├── Schedules (recurring job triggers)
        │     └── Registries (cross-workspace sharing)
        └── AI Foundry Hub (kind=hub) + Projects (kind=project)
AI Foundry Hub/プロジェクトとクラシックワークスペースの比較
機能クラシックワークスペース(kind=Default)AI Foundry Hub + プロジェクト
ポータルml.azure.comai.azure.com
スコープ単一のワークスペースHub で複数のプロジェクト間でインフラを共有
ネットワークワークスペース単位Hub レベル(複数のプロジェクト間で共有)
IDワークスペース単位Hub レベルの ID をプロジェクトが継承
モデルカタログありあり。さらに Foundry モデルを利用可能
プロンプトフローありあり
AI エージェント限定的AI Agent Service のすべての機能
ユースケース従来の ML、カスタムトレーニング生成 AI、LLM アプリ、AI エージェント
ワークスペースの作成 — すべての方法

CLI:

# Install/upgrade ML extension
az extension add --name ml --upgrade

# Create resource group
az group create --name ml-rg --location eastus

# Create workspace with all dependencies auto-created
az ml workspace create \
  --name my-ml-workspace \
  --resource-group ml-rg \
  --location eastus

# Create workspace with explicit dependencies
az ml workspace create \
  --name my-ml-workspace \
  --resource-group ml-rg \
  --location eastus \
  --storage-account /subscriptions/<sub>/resourceGroups/ml-rg/providers/Microsoft.Storage/storageAccounts/mlstorage \
  --key-vault /subscriptions/<sub>/resourceGroups/ml-rg/providers/Microsoft.KeyVault/vaults/mlkeyvault \
  --app-insights /subscriptions/<sub>/resourceGroups/ml-rg/providers/Microsoft.Insights/components/mlinsights \
  --container-registry /subscriptions/<sub>/resourceGroups/ml-rg/providers/Microsoft.ContainerRegistry/registries/mlacr \
  --public-network-access Disabled \
  --managed-network AllowInternetOutbound \
  --image-build-compute cpu-build-cluster \
  --enable-data-isolation true \
  --tags Environment=Production Team=DataScience

# Create AI Foundry Hub
az ml workspace create \
  --name my-ai-hub \
  --resource-group ml-rg \
  --location eastus \
  --kind hub \
  --storage-account aihubstorage \
  --key-vault aihubkeyvault

# Create AI Foundry Project within Hub
az ml workspace create \
  --name my-ai-project \
  --resource-group ml-rg \
  --location eastus \
  --kind project \
  --hub-id /subscriptions/<sub>/resourceGroups/ml-rg/providers/Microsoft.MachineLearningServices/workspaces/my-ai-hub

# Show workspace details
az ml workspace show \
  --name my-ml-workspace \
  --resource-group ml-rg

# List all workspaces
az ml workspace list \
  --resource-group ml-rg \
  --output table

# Update workspace
az ml workspace update \
  --name my-ml-workspace \
  --resource-group ml-rg \
  --description "Updated workspace" \
  --public-network-access Disabled

# Delete workspace
az ml workspace delete \
  --name my-ml-workspace \
  --resource-group ml-rg \
  --permanently-delete --all-resources

# Diagnose workspace configuration
az ml workspace diagnose \
  --name my-ml-workspace \
  --resource-group ml-rg

PowerShell(Az.MachineLearningServices):

# Install the module
Install-Module -Name Az.MachineLearningServices -Scope CurrentUser -Repository PSGallery -Force

# Create workspace
New-AzMLWorkspace `
  -Name "my-ml-workspace" `
  -ResourceGroupName "ml-rg" `
  -Location "eastus" `
  -StorageAccountId "/subscriptions/<sub>/resourceGroups/ml-rg/providers/Microsoft.Storage/storageAccounts/mlstorage" `
  -KeyVaultId "/subscriptions/<sub>/resourceGroups/ml-rg/providers/Microsoft.KeyVault/vaults/mlkeyvault" `
  -ApplicationInsightId "/subscriptions/<sub>/resourceGroups/ml-rg/providers/Microsoft.Insights/components/mlinsights" `
  -IdentityType "SystemAssigned" `
  -PublicNetworkAccess "Disabled"

# Get workspace
Get-AzMLWorkspace -Name "my-ml-workspace" -ResourceGroupName "ml-rg"

# List workspaces
Get-AzMLWorkspace -ResourceGroupName "ml-rg"

# Update workspace
Update-AzMLWorkspace `
  -Name "my-ml-workspace" `
  -ResourceGroupName "ml-rg" `
  -Description "Updated workspace" `
  -Tag @{Environment="Production"}

# Remove workspace
Remove-AzMLWorkspace -Name "my-ml-workspace" -ResourceGroupName "ml-rg"

# Diagnose workspace
Invoke-AzMLWorkspaceDiagnose -Name "my-ml-workspace" -ResourceGroupName "ml-rg"

2. ネットワーク

Azure ML は、3 種類のマネージドネットワーク分離モード(Disabled、AllowInternetOutbound、AllowOnlyApprovedOutbound)をサポートしています。本番環境ではマネージド VNet のアプローチが推奨されます。プライベートエンドポイントはインバウンド接続を提供し、アウトバウンドルールはコンピューティングリソースからの送信トラフィックを制御します。

主要な DNS ゾーン
サービスプライベート DNS ゾーン
ML ワークスペース APIprivatelink.api.azureml.ms
ML ノートブックprivatelink.notebooks.azure.net
Storage Blobprivatelink.blob.core.windows.net
Storage Fileprivatelink.file.core.windows.net
Key Vaultprivatelink.vaultcore.azure.net
Container Registryprivatelink.azurecr.io
Application Insightsprivatelink.monitor.azure.com
主要なサービス タグ
サービス タグ用途
AzureMachineLearningML ワークスペースの管理(インバウンド 44224、アウトバウンド 443)
BatchNodeManagementコンピューティングクラスターの管理(インバウンド 29876-29877)
StorageAzure Storage へのアクセス(アウトバウンド 443)
AzureActiveDirectory認証(アウトバウンド 443)

VNet の設定、プライベートエンドポイントの構成、NSG ルール、アウトバウンドルールの管理について詳しくは、references/networking.md を参照してください。


3. コンピューティング

Azure ML では、複数のコンピューティングターゲットを利用できます。開発/テスト向けの Compute Instances、スケーラブルなトレーニング向けの AmlCompute Clusters、クラスター管理なしでオンデマンドのジョブを実行できる Serverless Compute、BYO インフラストラクチャのシナリオ向けの Kubernetes Compute です。

GPU VM SKU のクイックリファレンス
VM シリーズGPUGPU メモリ用途
Standard_NC24ads_A100_v41x A10080 GBトレーニング、ファインチューニング
Standard_ND96amsr_A100_v48x A100 80GB640 GB大規模モデルのトレーニング
Standard_ND_H100_v58x H100640 GB生成 AI、LLM トレーニング
Standard_ND_H200_v58x H2001120 GB最新:H100 の 2 倍の性能
Standard_NCads_H100_v51x H100 NVL94 GB推論、ファインチューニング
Standard_NC4as_T4_v31x T416 GB低コストの推論

GPU SKU の完全な一覧、コンピューティングインスタンス/クラスターの CLI リファレンス、Serverless Compute、Kubernetes の接続方法、デバッグコマンドについては、references/compute.md を参照してください。


4. エンドポイントのデプロイ

Azure ML は 4 種類のエンドポイントをサポートしています。ブルーグリーンデプロイでリアルタイム推論を行うのに推奨される Managed Online Endpoints、コンピューティングクラスターで大規模なスコアリングを行う Batch Endpoints、BYO AKS/Arc インフラストラクチャを利用する Kubernetes Online Endpoints、従量課金制のトークン単位の Model-as-a-Service を提供する Serverless Endpoints です。

エンドポイントタイプのクイックリファレンス
タイプユースケース認証モードスケーリング
マネージドオンラインリアルタイム推論key, aml_tokenデプロイごとのインスタンス数
バッチ大規模なスコアリングマネージド IDコンピューティングクラスターの自動スケーリング
Kubernetes オンラインBYO インフラでのリアルタイム処理key, aml_tokenK8s ポッドのスケーリング
サーバーレス(MaaS)トークン単位の従量課金 LLMkey自動

エンドポイントの作成、デプロイ、トラフィック分割、ログ取得、バッチ呼び出しの全コマンドについては、references/endpoints.md を参照してください。


5-7. ID、ACR、ストレージ

マネージド ID(システム割り当てまたはユーザー割り当て)によって、ワークスペース、コンピューティング、エンドポイント、および依存リソース間のアクセスを制御します。ACR は環境とモデルサービング用の Docker イメージを保存します。プライベートエンドポイントを使用する場合は Premium SKU が必要であり、VNet 内にある場合はイメージビルド用のコンピューティングクラスターが必要です。ストレージアカウントは、Blob、ファイル共有、ジョブ出力、MLflow アーティファクト用の既定のデータストアとして機能します。

ID の種類
ID の種類ユースケース
システム割り当て(ワークスペース)既定のワークスペース操作、自動ライフサイクル管理
ユーザー割り当て(ワークスペース)CMK 暗号化、リソース間での共有
システム割り当て(コンピューティング)クラスター単位のストレージ/ACR アクセス
ユーザー割り当て(コンピューティング)きめ細かな再利用可能なアクセス制御
主な RBAC ロール
ロール説明
AzureML Data Scientistジョブの実行、コンピューティングの管理、モデルのデプロイ
AzureML Compute Operatorコンピューティングリソースの作成/管理
Azure AI DeveloperAI Foundry プロジェクトの開発
Azure AI Inference Deployment Operatorエンドポイントへのモデルのデプロイ

ID の完全な構成、ロール割り当てコマンド、ACR 統合、プライベート ACR の設定、データストアの登録、ストレージアカウントの詳細については、references/identities-acr-storage.md を参照してください。


8-9. CLI と PowerShell

az ml CLI 拡張機能では、ワークスペース、コンピューティング、ジョブ、モデル、エンドポイント、環境、データ、データストア、コンポーネント、スケジュール、レジストリ、接続を網羅する 20 以上のコマンドグループを通じて、包括的なワークスペース管理を行えます。Az.MachineLearningServices PowerShell モジュールでは、Windows ネイティブの自動化向けに同等の機能を提供します。

主な az ml コマンドグループ
コマンドグループ目的
az ml workspaceワークスペースの管理(作成、診断、ネットワークのプロビジョニング、アウトバウンドルール)
az ml computeコンピューティングの管理(作成、開始、停止、SSH 接続、アタッチ)
az ml jobジョブの管理(作成、ストリーミング、キャンセル、ダウンロード)
az ml online-endpointオンラインエンドポイントの管理(作成、呼び出し、認証情報の取得)
az ml online-deploymentデプロイの管理(作成、ログ取得、トラフィック)
az ml batch-endpointバッチエンドポイントの管理(作成、呼び出し、ジョブ一覧表示)
az ml serverless-endpointサーバーレスエンドポイントの管理(作成、認証情報の取得)

コマンドの完全なリファレンス、ジョブ管理の詳細、スケジュール管理、PowerShell コマンドレットの完全なリファレンスについては、references/cli-powershell.md を参照してください。


10. TERRAFORM 統合

Azure ML ワークスペースは、azurerm プロバイダーを使用して Terraform で完全にプロビジョニングできます。本番環境のセットアップには、ワークスペース、VNet/サブネット、NSG、ストレージアカウント、キーコンテナー、ACR、Application Insights、プライベートエンドポイント、DNS ゾーン、コンピューティングクラスター、RBAC ロールの割り当てが含まれます。

主要な Terraform リソース
リソース用途
azurerm_machine_learning_workspaceML ワークスペース(Default、Hub、Project)
azurerm_machine_learning_compute_clusterAmlCompute トレーニングクラスター
azurerm_machine_learning_compute_instance開発/テスト用コンピューティングインスタンス
azurerm_machine_learning_workspace_network_outbound_rule_*マネージドネットワークの送信ルール

本番環境に対応した完全な Terraform 構成(プロバイダー、ネットワーク、ストレージ、キーコンテナー、ACR、ワークスペース、コンピューティング、ロールの割り当て、出力)については、references/terraform.md をご覧ください。


11. トラブルシューティングとデバッグ

Azure ML では、リアルタイムのジョブログのストリーミング、デプロイコンテナーのログ(推論サーバーとストレージ初期化ツール)、システムレベルの診断に使用するコンピューティングインスタンスへの SSH アクセス、履歴分析用の Log Analytics クエリ、構成検証用の az ml workspace diagnose コマンドなど、複数のデバッグ手段が用意されています。

よくあるエラーのカテゴリ
カテゴリよくあるエラー
コンピューティングQuotaExceeded、AllocationFailed、ディスク容量不足、GPU が検出されない
エンドポイントScoringError、HealthCheckFailure、ImageBuildFailed、429/503 エラー
ネットワークDNS 解決の失敗、接続タイムアウト、ストレージ/ACR へのアクセス拒否
ジョブEnvironmentBuildError、OutOfMemoryError、NCCL タイムアウト、BLOB が見つからない

エラーの完全な参照表、ログの場所、Log Analytics クエリ、エンドポイントのメトリック監視、ワークスペースの診断、セキュアなワークスペースのセットアップチェックリストについては、references/troubleshooting.md をご覧ください。


その他のリソース

トピックごとの詳細なリファレンスファイル:

外部ドキュメント

コメント