2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AWS EC2で将棋ソフトを動かす。

Last updated at Posted at 2020-08-02

1. 設定手順

みくにまるさんのブログは、初心者向けに丁寧にAWSでのセットアップ方法が書いてある。ただし、AWSに慣れた人からすると、アカウント作成から書いてあるので冗長で読みずらい。このため、必要なところだけ抜き出してみた。なお、構成は、以下のとおりである。

  • ノートPC(Windows10)
  • サーバ(AWS EC2)

これにより、ノートPCと、AWSに接続できるインターネット環境があれば、1時間70円程度で毎秒2000万局面読める環境が構築できる。

1.1. 将棋エンジンのセットアップ

1.1.1. AMIインスタンスの作成

インスタンスのイメージをshogiで検索する。なお、Amazon Linux2でインスタンスはできているので、ec2-userでログインできる。
2020年8月1日現在の最新イメージは以下の模様

ami-084b54ebcb697a77f

1.1.2. セットアップができていることの確認

以下のスクリプト(AWS.bat)を作成する。ここでは、以下の2つを設定する必要がある。

  • 鍵ファイル(key.pem)
  • ホスト名(ec2-xxx-xxx-xxx-xxx.ap-northeast-1.compute.amazonaws.com)

その後、スクリプトをダブルクリックして起動する。

@echo off
setlocal

cd /d %~dp0

ssh -i key.pem ec2-user@ec2-xxx-xxx-xxx-xxx.ap-northeast-1.compute.amazonaws.com cd ./engine;./YaneuraOu-avx2

pause

コンソール上でusiとたたくと、それらしき出力が出る。

1.2. ShogiGUIの設定

上記で、設定が終わった。今度は、GUIから接続する。

ツール(T)=>エンジン設定(E)から、上記のAWS.batを登録する。

A. 参考資料

A.1. みくにまるさんの頁

A.2. ShogiGUI

2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?