Metadata-Version: 2.1
Name: runai-interactive-context
Version: 0.0.1
Summary: CLI to run an interactive session on RunAI with cleaning on exit to limit costs
Project-URL: Documentation, https://github.com/LSIR/runai-interactive-context#readme
Project-URL: Issues, https://github.com/LSIR/runai-interactive-context/issues
Project-URL: Source, https://github.com/LSIR/runai-interactive-context
Author-email: Stephane Massonnet <stephane.massonnet@epfl.ch>
License-Expression: MIT
License-File: LICENSE.txt
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.9
Requires-Dist: retry
Requires-Dist: typer[all]
Description-Content-Type: text/markdown

# RunAI interactive context

[![PyPI - Version](https://img.shields.io/pypi/v/runai-interactive-context.svg)](https://pypi.org/project/runai-interactive-context)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/runai-interactive-context.svg)](https://pypi.org/project/runai-interactive-context)

This CLI improves the interactive mode of the `runai` CLI by:

- Deleting the job on exit to reduce the costs of idle interactive sessions.
- Allowing for longer delays when asking for a port forward (RunAI CLI only waits 60 seconds)
- Parsing and translating url of a jupyter notebook (with the forwarded port and token information).

-----

**Table of Contents**

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)

## Installation

```console
pip install runai-interactive-context
```

## Usage

Start an interactive jupyter server:

```console
runai-interactive --mode jupyter <job_name> <image_name> -- jupyter server
```

Run a streamlit application

```console
runai-interactive --mode port --container-port 8501 <job_name> <image_name> -- streamlit app.py
```

## License

`runai-interactive-context` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
