Metadata-Version: 2.2
Name: ocifit
Version: 0.0.1
Summary: Extract and assess compatibility of container images
Home-page: https://github.com/compspec/ocifit
Author: Vanessa Sochat
Author-email: vsoch@users.noreply.github.com
Maintainer: Vanessa Sochat
License: LICENSE
Keywords: docker,containers,introspection,opencontainers,compatibility
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: C
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: protobuf>=5.29.3
Requires-Dist: google-generativeai>=0.8.5
Provides-Extra: all
Requires-Dist: protobuf>=5.29.3; extra == "all"
Requires-Dist: google-generativeai>=0.8.5; extra == "all"
Requires-Dist: pytest>=4.6.2; extra == "all"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: maintainer
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: summary

# ocifit

> Determine if a container is fit for an environment using OCI artifacts

[![PyPI version](https://badge.fury.io/py/ocifit.svg)](https://badge.fury.io/py/ocifit)

This tool is intended for the HPC community to assess the fit of an application container to a cloud environment.

## Design

We want to:

1. Generate compatibility artifacts for a set of containers (from Dockerfile or URI).
2. Generate [node feature groups](https://kubernetes-sigs.github.io/node-feature-discovery/v0.17/usage/customization-guide.html#nodefeaturegroup-custom-resource) that can describe nodes in an HPC cluster, or a Kubernetes cluster.
3. Assess how well a set of containers matches a node feature group
4. Return a recommended list.

To start, I will use the Gemini API to take a Dockerfile or container URI and go up one level (parent) to derive software.

## Development

Install dependencies and shell in:

```bash
pixi install
pixi shell
```

And export your `GEMINI_TOKEN`

```bash
export GEMINI_TOKEN=xxxxxxxxx
```

Then test against an image, optionally adding a uri to include.

```bash
ocifit compat --uri ghcr.io/converged-computing/lammps-reax:ubuntu2204 ./Dockerfile
```

Try using a different parser:

```bash
ocifit compat --uri ghcr.io/converged-computing/lammps-reax:ubuntu2204 ./Dockerfile --parser nfd
```

By default, parsed parent images are saved to a cache in `~/.ocifit`. If you add `--save` and provide a URI with `--uri`, your image will be as well. Note that this currently doesn't parse into a proper artifact because we still need to think about how the key/value pairs will work.

 - [see example for lammps-reax](examples/lammps-reax.json)

## License

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

See [LICENSE](https://github.com/converged-computing/cloud-select/blob/main/LICENSE),
[COPYRIGHT](https://github.com/converged-computing/cloud-select/blob/main/COPYRIGHT), and
[NOTICE](https://github.com/converged-computing/cloud-select/blob/main/NOTICE) for details.

SPDX-License-Identifier: (MIT)

LLNL-CODE- 842614
