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

Container Profile

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

Source Code Profile

# default execution is container.
artifact-secretary shape --backend aws --model us.anthropic.claude-sonnet-5 \
  --repos https://github.com/lammps/lammps --focus reaxff \
  --max-source-tokens 60000 --model-max-tokens 16384 --out shapes.json

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.13

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.13
File Size Uploaded
artifact_secretary-0.0.13.tar.gz 67.1 kB Details

Built distribution (wheel)

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

Total release size: 126.0 kB

Release files / artifact_secretary-0.0.13.tar.gz

Download URL artifact_secretary-0.0.13.tar.gz
Size 67.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0e24ff24bb145f0f7c9cdfd8aa2b0eb9467fb9b06d2ff4aca2bd872cc8115b82
BLAKE2b-256 checksum
How to use checksums
5dffe7d048c71b615dd0889e34fa31afa2633353e2ba60e6eac76a23dad04f6e
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.13-py3-none-any.whl

Download URL artifact_secretary-0.0.13-py3-none-any.whl
Size 58.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
116f4b891462f08ef6769a26b08d599e95ef33d4c12579cb130e74d41c65bae1
BLAKE2b-256 checksum
How to use checksums
956dfbdd8ca27449ff012d1c81c51bb9f27fd2f1fea5251b8da128efa0002133
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

This release

0.0.13 This release

2 release files

0.0.12

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