本文へスキップ
Skillpedia
デプロイとクラウド(DevOps)5.4k · #14853

compute-env-setup

できること

このスキルは、リモートの計算ホスト用の有効化ファイルを準備する方法を説明します。ジョブが正しいパッケージを読み込むよう、セットアップの手順を書き、環境を確認します。ユーザーのリソースの作成や削除は、ユーザーに任せます。

使う場面

  • ✓リモートのジョブに、ホストがまだ提供していないパッケージ、モジュール、キャッシュの設定が必要なとき。
  • ✓ユーザーが、Open Science の計算ホストで繰り返し使える環境の有効化を必要とするとき。
  • ✓ホストにパッケージやモジュールがないためにリモートのジョブが失敗したとき。

スキルのリンク

https://github.com/aipoch/open-science/blob/main/resources/skills/compute-env-setup/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/aipoch/open-science/blob/main/resources/skills/compute-env-setup/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私のリモートのジョブが、計算ホストで特定の Python パッケージ群を必要としています。セットアップの手順と有効化ファイルを準備してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは既存の環境の定義を確認し、必要な設定を含む有効化ファイルを書き、正確なセットアップのコマンドを示します。ユーザーのリソースを作成または削除するコマンドは、自分では実行しません。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Compute environment setup

Prepare one reproducible environment definition and instructions for one small user-managed host activation file. Open-Science resolves submitJob(..., { environment: '<name>' }) by sourcing ~/.open-science/environments/<name>.sh before the workload. Existing ~/.openscience/environments/<name>.sh definitions remain readable in place. Before creating an activation, check both names: update the existing definition at its exact location; if both exist, ask the user which to retain. Never create a second activation just to rename the brand. The file contains activation only; it does not install packages when a job starts.

Software environment setup and Slurm accounting service configuration are separate concerns. An unavailable sacct service is not evidence that Python, Conda, modules, or the named activation file are missing. Use the Remote Compute Skill's Slurm troubleshooting reference for scheduler status and cancellation problems; do not make enabling accounting the only recovery path or assume the user has administrator privileges.

The environment, package caches, images, and activation file are user-managed durable resources, not Open-Science-owned components. This Skill may inspect them and prepare exact setup/removal commands, but must not execute commands that create, replace, or remove those resources. The user or host administrator runs those commands outside Open-Science and owns their lifecycle. Do not interpret the ~/.openscience path as app ownership.

Use host.compute only in repl_execute JavaScript. Python and R data kernels do not expose it. Start from the Session catalog and do not guess a provider id:

const hosts = await host.compute.listHosts()
const selected = hosts.filter((candidate) => candidate.role === 'selected')
const candidates = selected.length > 0 ? selected : hosts

Choose the requested host, or a suitable candidate when the user left the target open. Read its knowledge and probe snapshot before changing it:

const providerId = candidates[0].provider_id
const executionMode = candidates[0].execution_mode
const details = await host.compute.details(providerId, { mode: 'read' })
const compute = host.compute.create(providerId)

If no eligible host exists, or the selected host is unsuitable, explain the concrete blocker. Do not install locally as a substitute for a requested remote environment.

Define the environment

Keep the reproducible source in the user's project: an environment.yml, requirements or lock file, container definition, or a short setup script appropriate to the stack. When installation must run on a compute node, include exact user- or administrator-run staging and scheduler commands in the plan; do not submit that installation through Open-Science. Do not store project package lists or secrets in the host knowledge document.

Use a logical name containing 1–64 letters, numbers, periods, underscores, or hyphens, starting with a letter or number. Its host activation file is:

~/.open-science/environments/<name>.sh

The activation file itself and every path it references must be visible at the same path on the execution node. A shared home directory satisfies this. If login and compute nodes have separate homes, copy the activation file to the compute-node home at the same path and use shared software and data paths inside it; if the host offers no durable way to do that, explain the limitation.

Prefer the host's existing environment system:

  • Conda or micromamba: create the environment from the project definition, then source the shell hook and activate it in the activation file.
  • Modules: load the exact module versions in the activation file. Combine modules with a venv or conda environment when Python packages are also needed.
  • Apptainer or Singularity: installation and image creation are cluster-specific. Use an existing shared image when possible. Do not claim that environment wraps an arbitrary command in a container; the activation contract only sources shell setup.

Set cache paths and bounded thread variables in the activation file when the workload needs them. Keep credentials out of it. Avoid sudo, system package changes, shell-profile edits, and unrequested changes to other named environments.

Before installing, use one batched, read-only probe to identify the scheduler, available environment tools, relevant modules, quotas, and shared scratch. A typica

よくある質問

有効化ファイルはパッケージをインストールしますか?

いいえ。有効化のみを含み、ジョブの開始時にパッケージはインストールしないとされています。

アカウンティングのサービスが停止している場合はどうしますか?

それは環境がないことを意味しないとされ、スケジューラーのトラブルシューティングの参照先を示します。

誰が環境を管理しますか?

ユーザーまたはホストの管理者が管理し、このスキルはコマンドを準備するだけです。

詳細

作者による元の説明

Prepare reproducible setup instructions and validate a user-managed named software environment on an Open-Science SSH Compute Host, including direct SSH and Slurm hosts. Use when a remote job needs packages, modules, cache variables, or a repeatable activation that the host does not already provide.

repo: aipoch/open-science

人気

GitHubのスター
5.4k
ランキング
#14853
ライセンス
Apache-2.0
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル