Globus Computeのロゴ

Globus Compute

組織
AI-ModCon
globus-compute

Submit Python functions as jobs to NERSC Perlmutter via Globus Compute. Use this skill when the user wants to login to Globus, send a compute job, check task status, or get results from a remote HPC endpoint. Covers auth, endpoint configuration via Jinja2 templates, job submission with user_endpoint_config, and result retrieval.

概要

公開者AI-ModCon
リポジトリgenesis-skills
スキル名globus-compute
スター
37
フォーク
16
同梱ファイル
3
ライセンスBSD-2-Clause
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 3個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    AI-ModConがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルGlobus ComputeをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/AI-ModCon/genesis-skills/tree/main/skills/amsc-skills/globus-compute
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AI-ModCon/genesis-skills.git /tmp/genesis-skills
mkdir -p .claude/skills
cp -r /tmp/genesis-skills/skills/amsc-skills/globus-compute .claude/skills/globus-compute
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでGlobus Computeを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にGlobus Computeを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Globus Computeは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Globus Compute (NERSC)

Submit Python functions to NERSC Perlmutter via globus-compute-sdk using template-capable endpoints and user_endpoint_config for per-job customization.

Setup

bash
uv venv .venv --python 3.13
uv pip install globus-compute-sdk globus-sdk

Python version MUST match the endpoint workers (Perlmutter default: 3.13). Globus Compute serializes functions as bytecode via dill — version mismatch = opcode errors.

CRITICAL: Login requires interactive terminal

Auth uses browser-based OAuth. input() does NOT work from Claude Code. Tell user to run login commands directly in their terminal (not via ! prefix).

Architecture

Local (gc_run.py)                    Globus Compute Service           NERSC Perlmutter
─────────────────                    ──────────────────────           ────────────────
Executor.submit(func,                Routes task to endpoint          Endpoint receives task
  user_endpoint_config={             via AMQP queue                   ↓
    NERSC_ACCOUNT: "m0000",                                          Renders config.yaml from
    OPTIONS: "#SBATCH ...",                                          user_config_template.yaml.j2
    COMMAND: "module load ..."                                       + user_endpoint_config
  })                                                                 ↓
     ↓                                                               sbatch → SLURM allocates node
polls for result ←──────────────── result returns ←───────────────── worker executes func → result

Template-capable endpoint (on Perlmutter)

The endpoint uses user_config_template.yaml.j2 with Jinja2 variables. Users pass values at submit time via user_endpoint_config dict — no need to SSH and edit config.yaml for each job.

Endpoint setup (one-time, on Perlmutter)

bash
ssh <username>@perlmutter.nersc.gov
module load python
pip install --user globus-compute-endpoint

globus-compute-endpoint configure perlmutter
# If prompted, run: globus-compute-endpoint migrate-to-template-capable perlmutter

Edit ~/.globus_compute/perlmutter/user_config_template.yaml.j2:

yaml
engine:
  type: GlobusComputeEngine
  worker_debug: False

  address:
    type: address_by_interface
    ifname: hsn0

  provider:
    type: SlurmProvider

    launcher:
      type: SrunLauncher
      overrides: -c 128

    scheduler_options: {{ OPTIONS }}
    account: {{ NERSC_ACCOUNT }}
    worker_init: {{ COMMAND }}
    cmd_timeout: 120

    nodes_per_block: 2
    init_blocks: 0
    min_blocks: 0
    max_blocks: 1
    walltime: 00:10:00

Do NOT set partition — Perlmutter auto-selects from the -C constraint in OPTIONS.

Start it:

bash
globus-compute-endpoint start perlmutter
# → Endpoint UUID: <uuid>

Template variables

VariableExamplePurpose
NERSC_ACCOUNTm0000NERSC allocation (required)
OPTIONS#SBATCH -C cpu\n#SBATCH -q debugSLURM scheduler directives
COMMANDmodule load python; source activate myenvWorker init commands

Quick start

1. First-time login (user runs in terminal)

bash
.venv/bin/python scripts/gc_auth.py login

2. Configure default endpoint (one-time)

bash
.venv/bin/python scripts/gc_run.py config set-endpoint <endpoint_uuid> --name "perlmutter"

3. Run sample test (get_hostname)

bash
.venv/bin/python scripts/gc_run.py sample \
  --account m0000 \
  --options "#SBATCH -C cpu\n#SBATCH -q debug" \
  --worker-init "module load python"

Expected: SUCCESS: hostname = nid001234 (a Perlmutter compute node)

4. Run a custom function

bash
.venv/bin/python scripts/gc_run.py run my_func.py \
  --account m0000 \
  --options "#SBATCH -C cpu\n#SBATCH -q debug" \
  --worker-init "module load python"

5. Check status / get result

bash
.venv/bin/python scripts/gc_run.py status
.venv/bin/python scripts/gc_run.py result <task_id>

Python API (inline use)

python
from globus_compute_sdk import Executor

def get_hostname():
    import socket
    return socket.gethostname()

endpoint_id = "<endpoint_uuid>"
user_endpoint_config = {
    "NERSC_ACCOUNT": "m0000",
    "OPTIONS": "#SBATCH -C cpu\n#SBATCH -q debug",
    "COMMAND": "module load python",
}

with Executor(endpoint_id=endpoint_id, user_endpoint_config=user_endpoint_config) as ex:
    future = ex.submit(get_hostname)
    print(future.result())  # nid001234

NERSC-specific notes

ItemDetail
AccountAlways pass NERSC_ACCOUNT — no default, jobs fail without it
No partitionNever set partition — SLURM picks from -C constraint
Networkifname: hsn0 (high-speed fabric) in template, not bond0
Python versionLocal and endpoint must match (both 3.13) — bytecode serialization
GPU nodesUse OPTIONS: "#SBATCH -C gpu\n#SBATCH -q debug\n#SBATCH --gpus=4"
CPU nodesUse OPTIONS: "#SBATCH -C cpu\n#SBATCH -q debug"
Debug QOS30 min max, 8 nodes max, high priority — good for testing
Regular QOS48h max — use for real workloads

Auth helper (scripts/gc_auth.py)

bash
.venv/bin/python scripts/gc_auth.py status      # check token (non-interactive)
.venv/bin/python scripts/gc_auth.py login        # interactive login
.venv/bin/python scripts/gc_auth.py token        # print access token
.venv/bin/python scripts/gc_auth.py logout       # remove tokens

Endpoint management (on Perlmutter)

bash
globus-compute-endpoint list
globus-compute-endpoint start perlmutter
globus-compute-endpoint stop perlmutter
globus-compute-endpoint restart perlmutter

Scope

Handles Globus Compute job submission, auth, endpoint config via templates. Does NOT handle: Globus Transfer, Globus Search, other Globus services, academy/exchange framework integration, or endpoint provisioning automation.

Security

Never log or expose access/refresh tokens. Token files are mode 600. Do not commit token databases or config files containing endpoint IDs to git.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Globus Compute」では何ができますか?

Submit Python functions as jobs to NERSC Perlmutter via Globus Compute. Use this skill when the user wants to login to Globus, send a compute job, check task status, or get results from a remote HPC endpoint. Covers auth, endpoint configuration via Jinja2 templates, job submission with user_endpoint_config, and result retrieval.

TypingMindでGlobus Computeを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Globus Computeはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにGlobus Computeをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/AI-ModCon/genesis-skills/tree/main/skills/amsc-skills/globus-computeを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Globus Computeを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Globus Computeは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもGlobus Computeを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Globus Compute」は無料ですか?

はい。AI-ModConがGitHubでBSD-2-Clauseライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇