Skip to main content

artifact-secretary

DOI

https://github.com/converged-computing/artifact-secretary/blob/main/img/artifact-secretary-small.png

PyPI - Version

This library serves as a discovery tool to look into opaque objects (like containers) to figure out what is needed to run, build, etc. Our use case is for scheduling. We want to find the best spot for said opaque container.

Details

Container Discovery

For each image in a catalog:

  1. Start the container running.
  2. Copy our inspection code (Python) into it.
  3. An agent drives the inspection (find binary, read ELF and linkage, how compiled).
  4. Writes results into an artifact.

Install

Use the devcontainer (.devcontainer/).

python3 -m pip install -e .
python3 -m pip install -e .[aws]

# Claude
export ANTHROPIC_API_KEY=sk-ant-...

# AWS
export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...
export AWS_DEFAULT_REGION=us-east-1

# OR
export AWS_BEARER_TOKEN_BEDROCK=...

Test connection:

aws sts get-caller-identity
aws bedrock list-inference-profiles --region "$AWS_DEFAULT_REGION" \
  --query 'inferenceProfileSummaries[].inferenceProfileId' --output text
python3 -c "import boto3; print(boto3.client('sts').get_caller_identity()['Arn'])"
python3 -c "import boto3,os; c=boto3.client('bedrock', region_name=os.environ.get('AWS_DEFAULT_REGION','us-east-1')); print([p['inferenceProfileId'] for p in c.list_inference_profiles()['inferenceProfileSummaries']])"

And test:

python3 - <<'PY'
from strands import Agent
from strands.models import BedrockModel
m = BedrockModel(model_id="us.anthropic.claude-sonnet-5",  # paste a real one from step 3
                 region_name="us-east-1")
print(Agent(model=m)("say ok"))
PY

Usage

Here is a one-off example:

artifact-secretary profile --backend aws \
  --model us.anthropic.claude-sonnet-5 \
  --catalog ghcr.io/converged-computing/metric-lammps-cpu:zen4-reax \
  --out lookup.json --keep-images

By default it deletes any image it had to pull so your disk doesn't fill up. Images you already had are left alone. Use --keep-images to keep everything.

The inspection library works on its own if you just want the facts and don't want an agent or a key:

from secretary import Target, Inspector, derive_capability
insp = Inspector(Target("/opt/lammps"))
elf = insp.inspect_elf("/build/lmp")
cap = derive_capability(elf["needed"], elf["rpath"])

Here is how to use the artifact secretary to list packages and tags from GitHub packages:

export GITHUB_TOKEN=...   # needs read:packages
artifact-secretary list --org converged-computing --repo performance-study

And then derive each one:

for repo in $(cat repos.txt)
  do
    artifact-secretary profile --backend aws --model us.anthropic.claude-opus-5 \
      --catalog "$repo" --out-dir manifests --allow-network
done

License

HPCIC DevTools is distributed under the terms of the MIT license. All new contributions must be made under this license.

See LICENSE, COPYRIGHT, and NOTICE for details.

SPDX-License-Identifier: (MIT)

LLNL-CODE- 842614

Release files for artifact-secretary 0.0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for artifact-secretary 0.0.12
File Size Uploaded
artifact_secretary-0.0.12.tar.gz 33.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for artifact-secretary 0.0.12
File Interpreter ABI Platform
artifact_secretary-0.0.12-py3-none-any.whl Python 3 none any Details

Total release size: 66.7 kB

Release files / artifact_secretary-0.0.12.tar.gz

Download URL artifact_secretary-0.0.12.tar.gz
Size 33.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bac9a5ac16508d4044f8f8ff3f8a70413d2bb663feba9f7c76f5e0a29658ee72
BLAKE2b-256 checksum
How to use checksums
25a1299653cb4ea333a7a79d74cb7c35867eb7a1353f4e6ffc8962e2f4926509
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Release files / artifact_secretary-0.0.12-py3-none-any.whl

Download URL artifact_secretary-0.0.12-py3-none-any.whl
Size 33.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc3322e9deb5d4239913e7a8fd0f3a2550a8e994004ca9807c14e7e23a8b6f91
BLAKE2b-256 checksum
How to use checksums
74411ca8a6663203a63b0e1e46a5036a1f94e9339fc87202c33135ea395a1cb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Release history Release notifications | RSS feed

0.0.13

2 release files

This release

0.0.12 This release

2 release files

0.0.11

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page