AI

Velero復元テスト

tasasei

経緯

veleroのバックアップの復元テストをしたかったのだけれども、 あまりにも面倒くさくて、Claude Codeに丸投げした。

復元完了後、veleroのrestores/ に復元レポートが保存される。

使用モデル、かかったコストは以下。CLIからは、/statusからのSessionで表示可能。

/status
  Total cost:            $2.81
  Total duration (API):  8m 28s
  Total duration (wall): 36m 20s
  Total code changes:    362 lines added, 0 lines removed
  Usage by model:
      claude-haiku-4-5:  303 input, 24 output, 0 cache read, 0 cache write ($0.0004)
     claude-sonnet-4-5:  281 input, 22.3k output, 5.1m cache read, 252.0k cache write ($2.80)

Claude Code をAmazon Bedrock APIキー経由で導入する

tasasei

Claude Codeデビューしたので、備忘録として残しておく。

Claude Code のインストール

Windowsで。PowerShellで以下のコマンドを実行。1

irm https://claude.ai/install.ps1 | iex

今回は、v2.1.175がインストールされた。 その後、インストール先のパスが表示されるので、コンソールからそのまま起動。

C:\Users\YourName\.local\bin\claude.exe

初回セットアップが走る。 なんかいい感じに、表示テーマとか聞いてくるので、その辺は適当に進める。

ログイン方法を聞いてくるので、この場合は3rd-partyを選択する。

    1. Claude account with subscription · Pro, Max, Team, or Enterprise
    2. Anthropic Console account · API usage billing
  > 3. 3rd-party platform · Amazon Bedrock, Microsoft Foundry, or Vertex AI

RunPodではじめる画像生成

tasasei

格安クラウドGPUサービス、RunPodを用いた画像生成に成功したので、 その方法を備忘録として記しておく。

アカウント作成、入金などは割愛する。

方法

URLは以下から。右上の「Deploy X.X.X」をクリックすればできるはず。 https://console.runpod.io/hub/runpod-workers/worker-a1111

作成したendpointは、左メニューのResources->Serverless、またはデフォルトならトップ画面の右上から確認できるはず。 そこから、コマンドを確認できる。

$ curl -X POST https://api.runpod.ai/v2/{endpoint_id}/run \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer YOUR_API_KEY' \
    -d '{"input":{"prompt":"a photo of an astronaut riding a horse on mars","negative_prompt":"blurry, bad quality","width":512,"height":512,"num_inference_steps":20,"guidance_scale":7.5,"seed":42}}'