事前準備

安裝SSH

安裝PUTTY

注冊AWS賬戶

Illustration of a Wooden 'Home' Sign with Cute House Icon

AWS EC2 g4dn.xlarge 介紹

NVIDIA T4 Tensor Core GPU

設有香港地區,亦可以選擇其他地區

如選擇香港地區,網絡延遲極低

OpenCL Benchmarks: 77085

以OpenCL引擎運行18b權重,每秒約380計算量

NVIDIA CUDA Cores: 2560

以CUDA引擎運行18b權重,每秒約750計算量

每小時費用約港幣$2

Illustration of a Wooden 'Home' Sign with Cute House Icon

AWS EC2 g6.xlarge 介紹

NVIDIA L4 Tensor Core GPU

需要選擇美國地區

有輕微網絡延遲

OpenCL Benchmarks: 140443

以OpenCL引擎運行18b權重,每秒約700計算量

NVIDIA CUDA Cores: 7680

以CUDA引擎運行18b權重,每秒約2200計算量

每小時費用約港幣$3

Illustration of a Wooden 'Home' Sign with Cute House Icon

提升配額

先提升配額。


提交申請後,需時1-2天才會收到配額提升的電郵和更新配額。

Illustration of a Wooden 'Home' Sign with Cute House Icon
Illustration of a Wooden 'Home' Sign with Cute House Icon
Illustration of a Wooden 'Home' Sign with Cute House Icon
Illustration of a Wooden 'Home' Sign with Cute House Icon
Illustration of a Wooden 'Home' Sign with Cute House Icon
Illustration of a Wooden 'Home' Sign with Cute House Icon

為EC2安裝KATAGO

Illustration of a Wooden 'Home' Sign with Cute House Icon

下載KataGo神經網路模型文件

wget https://media.katagotraining.org/uploaded/networks/models/kata1/kata1-b18c384nbt-s9996604416-d4316597426.bin.gz

wget https://media.katagotraining.org/uploaded/networks/models/kata1/kata1-b28c512nbt-s7168446720-d4316919285.bin.gz


更新系統的套件列表

sudo apt-get update


安裝unzip工具

sudo apt-get install unzip


下載KataGo程式的ZIP文件

wget https://github.com/lightvector/KataGo/releases/download/v1.14.1/katago-v1.14.1-cuda12.1-cudnn8.9.7-linux-x64.zip


解壓縮下載的KataGo ZIP文件

unzip katago-v1.14.1-cuda12.1-cudnn8.9.7-linux-x64.zip


修改KataGo執行檔的權限

chmod 777 katago


下載並安裝NVIDIA CUDA

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb

sudo dpkg -i cuda-keyring_1.0-1_all.deb

sudo apt-get update

sudo apt-get -y install cuda


下載並安裝NVIDIA CUDNN

sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"

sudo apt-get update

sudo apt-get install libcudnn8

sudo apt-get install libcudnn8-dev


下載並安裝libzip5庫

wget http://mirrors.kernel.org/ubuntu/pool/universe/libz/libzip/libzip5_1.5.1-0ubuntu1_amd64.deb

sudo apt install ./libzip5_1.5.1-0ubuntu1_amd64.deb

配置參數到界面

plink -v -ssh ubuntu@??????????????.???????.compute.amazonaws.com ./katago gtp -model kata1-​b18c384nbt-s9996604416-d4316597426.bin.gz -config default_gtp.cfg

Illustration of a Wooden 'Home' Sign with Cute House Icon