Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Nim + Cloud Run + TerraformでGCPにNimのサーバーレス環境を作る
Search
regonn
May 04, 2021
Programming
700
1
Share
Nim + Cloud Run + TerraformでGCPにNimのサーバーレス環境を作る
2021/05/04
@nim(ゆるい) LTイベント
regonn
May 04, 2021
More Decks by regonn
See All by regonn
Allora Network が実現する 「予測の経済圏」
regonn
0
15
Submission with Numerai Compute using GCP Batch
regonn
0
670
HelloMoon x Orca=HelloOrca
regonn
0
180
The Challenge of Automatically Configuring Numerai Compute Environment
regonn
0
140
Federated Learning 連合学習
regonn
3
1.8k
PLATEAUをデータベースに取り込んでみた
regonn
0
1.8k
古参Numerai参加者の戯言
regonn
1
2.6k
S+ Camera Basicと似た環境をラズパイから構築してみる
regonn
0
560
衛星画像のゴルフ場写り込み判定AIモデルを作る
regonn
0
860
Other Decks in Programming
See All in Programming
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
220
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.2k
LLM Plugin for Node-REDの利用方法と開発について
404background
0
150
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
100
[KCD Czech] eBPF Meets the GPU: Future of AI Infra Observability
doniacld
0
130
TSKaigi 2026 TypeScriptバックエンドのオブザーバビリティ戦略 — Datadog × NestJSの実践
taiseiyamamotoan
1
210
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.2k
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
200
ビジネスモデルから紐解く、AI+型駆動開発
hirokiomote
2
4.7k
CSC307 Lecture 17
javiergs
PRO
0
290
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
120
Modding RubyKaigi for Myself
yui_knk
0
830
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
55
12k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
350
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
74k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Designing for Timeless Needs
cassininazir
1
240
GraphQLとの向き合い方2022年版
quramy
50
15k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
300
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
580
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
220
Transcript
れごん 2021/05/04 @nim(ゆるい) LTイベント Nim + Cloud Run + Terraform
で GCP に Nim の サーバーレス環境を作る
Who am I? • れごん(@regonn_haizine) • 2018年に島根県にIターンで移住 • 機械学習系のPodcast ”Regonn&Curry.fm”
やってます
Nimとの出会い Slantという海外のテック系比較 サイトでBest programming languagesで1位になっていた。 (当時はまだ1系リリース前)
今日紹介すること • Nim でサーバーレス環境構築 • Nim • CPU実行時間の従量課金のため処理速度が重要 • Cloud
Run(GCP) • Dockerをデプロイすることで好きな言語で実行可能 • Terraform • インフラ構築がコードで管理可能(Infrastructure as Code)
構成図: 毎日決まった時間に気象庁APIから天気予報を取得してDiscordに投稿 GCP内のインフラ構築はTerraformで管理 天気予報API Container Registry Cloud Run Cloud Scheduler
コード解説 https://github.com/regonn/weather-discord-bot-cloud-run-terraform
コードの応用 • 今回のAPI取得の部分を切り替えることで色々と応用可能 • 普段は仮想通貨の自動売買とかやってます • 自動売買系も高頻度取引の場合等には処理速度が重要 • Nim言語で仮想通貨取引所APIを叩くコードまとめ記事 •
https://note.com/regonn314/n/n62d5adf25308
None