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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
24
Submission with Numerai Compute using GCP Batch
regonn
0
680
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
570
衛星画像のゴルフ場写り込み判定AIモデルを作る
regonn
0
880
Other Decks in Programming
See All in Programming
Performance Engineering for Everyone
elenatanasoiu
0
270
技術記事、 専門家としてのプログラマ、 言語化
mizchi
14
7.5k
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
0
280
5分で問診!Composer セキュリティ健康診断
codmoninc
0
330
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
1
190
OSINT for SRE: 学術論文とポストモーテムから探る システム障害の共通パターン / SRE NEXT 2026
tomoyk
1
3.8k
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
390
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
860
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
500
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
240
えっ!!コードを読まずに開発を!?
hananouchi
0
220
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
770
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
220
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
Practical Orchestrator
shlominoach
191
11k
Bash Introduction
62gerente
615
220k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.9k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
320
Everyday Curiosity
cassininazir
0
260
The World Runs on Bad Software
bkeepers
PRO
72
12k
Become a Pro
speakerdeck
PRO
31
6k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
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