Skip to main content

artifact-secretary

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

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 pipe to file, and manually clean
artifact-secretary list --org conver

And then derive each one:

for repo in $(cat repos.txt)
  do
    artifact-secretary profile --backend aws --model us.anthropic.claude-sonnet-5 \
      --catalog "$repo" --out-dir manifests --allow-network --keep-images
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.11

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.11
File Size Uploaded
artifact_secretary-0.0.11.tar.gz 29.8 kB Details

Built distribution (wheel)

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

Total release size: 61.1 kB

Release files / artifact_secretary-0.0.11.tar.gz

Download URL artifact_secretary-0.0.11.tar.gz
Size 29.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ce96251b3cec0e1ccc2d06abf11b8455f2defd0588caf73e0984185ba384c550
BLAKE2b-256 checksum
How to use checksums
3c0b5108ec91f2135f3032914ae8031ef365ee45de92e28c9f9ebeaec702d01e
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.11-py3-none-any.whl

Download URL artifact_secretary-0.0.11-py3-none-any.whl
Size 31.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf6113610d2539099a8a43153bda9ca4cba387b687a2e24e8fae6409209c5cb1
BLAKE2b-256 checksum
How to use checksums
13602fe36a179ebcc2165324972ca98a3c7faf348457706add67979591ff3857
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

0.0.12

2 release files

This release

0.0.11 This release

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