LoginSignup
1
1

Azure Web App for Containers に VOICEVOX コンテナをデプロイする

Last updated at Posted at 2023-09-05

この記事では、最近?流行りの VOICEVOX を Azure Web App for Containers にデプロイする方法を共有します。VOICEVOX の利用規約などは別途 VOICEVOX のレポジトリで確認してください。

Azure Web App for Containers

Azure Web App は Windows/Linux ベースの環境に .NET を始め、多くの言語をサポートする Web アプリのホスティングサービスですが、Docker コンテナをデプロイすることもできます。

今回はここに VOICEVOX のコンテナをデプロイします。

ポイントは以下の通り。

  • コンテナは通常の手順でデプロイできる
  • イメージは voicevox/voicevox_engine:cpu-ubuntu20.04-latest を利用
  • WEBSITE_PORTS を使ってポートを 443 から 50021 にリダイレクト

手順

  1. Linux ベースで Docker Container 用の Web App を作成する。SKU は Free で動作可能。
    1.png
  2. 以下のコマンドで VOICEVOX をデプロイする。
    az webapp config container set -c voicevox/voicevox_engine:cpu-ubuntu20.04-latest --name 
    <Web App の名前> -g <リソースグループ名>
    
  3. デプロイが完了したら Web App の Configuration より新しい Application settings を追加。
    2.png
  4. 名前: WEBSITES_PORT 値: 50021 を追加。
    3.png
  5. 保存して再起動。

テスト

デプロイが終われば HTTPS/443 よりアクセスが可能です。
4.png

まとめ

Azure は Docker コンテナをホストできるサービスが複数存在しますが、手軽に利用できる選択肢として Web App も是非検討してみてください。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1