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
1
660
Nim + Cloud Run + TerraformでGCPにNimのサーバーレス環境を作る
2021/05/04
@nim(ゆるい) LTイベント
regonn
May 04, 2021
Tweet
Share
More Decks by regonn
See All by regonn
Submission with Numerai Compute using GCP Batch
regonn
0
580
HelloMoon x Orca=HelloOrca
regonn
0
140
The Challenge of Automatically Configuring Numerai Compute Environment
regonn
0
97
Federated Learning 連合学習
regonn
4
1.7k
PLATEAUをデータベースに取り込んでみた
regonn
0
1.8k
古参Numerai参加者の戯言
regonn
1
2.5k
S+ Camera Basicと似た環境をラズパイから構築してみる
regonn
0
520
衛星画像のゴルフ場写り込み判定AIモデルを作る
regonn
0
800
データラーニングギルド での活動と今後
regonn
0
170
Other Decks in Programming
See All in Programming
Kotlinで実装するCPU/GPU 「協調的」パフォーマンス管理
matuyuhi
0
230
Module Proxyのマニアックな話 / Niche Topics in Module Proxy
kuro_kurorrr
0
970
CSC509 Lecture 08
javiergs
PRO
0
270
Pythonに漸進的に型をつける
nealle
1
150
Temporal Knowledge Graphで作る! 時間変化するナレッジを扱うAI Agentの世界
po3rin
5
1.1k
AI 駆動開発におけるコミュニティと AWS CDK の価値
konokenj
5
320
SidekiqでAIに商品説明を生成させてみた
akinko_0915
0
110
Developer Joy - The New Paradigm
hollycummins
1
400
エンジニアに事業やプロダクトを理解してもらうためにやってること
murabayashi
0
110
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
150
AI時代に必須!状況言語化スキル / ai-context-verbalization
minodriven
2
280
ボトムアップの生成AI活用を推進する社内AIエージェント開発
aku11i
0
1.4k
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
We Have a Design System, Now What?
morganepeng
54
7.9k
Embracing the Ebb and Flow
colly
88
4.9k
Typedesign – Prime Four
hannesfritz
42
2.8k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Side Projects
sachag
455
43k
Documentation Writing (for coders)
carmenintech
76
5.1k
Automating Front-end Workflow
addyosmani
1371
200k
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