Skip to content

A Flytekit plugin that enables running tasks on NVIDIA Cloud Functions (NVCF).

Notifications You must be signed in to change notification settings

ansjindal/flytekit-nvcf

Repository files navigation

Flytekit NVIDIA Cloud Functions Plugin

CI/CD PyPI version codecov License

A Flytekit plugin that enables running tasks on NVIDIA Cloud Functions (NVCF).

Installation

pip install flytekitplugins-nvcf

Usage

To use agent locallly, check example examples/test_agent_directly.py. Adjust the NVCF_API_KEY and NGC_ORG. Plus other functions related parameters accordingly. It creates the task, check the status and immediately delete it. We can further extend to monitor the status of task and then delete it.

We have more examples added under example folder as shown below which shows examples of using tasks.

examples/
├── basic_task_usage.py
├── basic_task_usage_inference.py
├── t5_text_processor
│   ├── Dockerfile
│   ├── README.md
│   ├── main.py
│   └── requirements.txt
├── tasks_sample
│   ├── Dockerfile
│   ├── README.md
│   ├── main.py
│   └── requirements.txt
└── test_agent_directly.py

Configuration

The plugin requires the following configuration:

  • NVCF_API_KEY: Your NVIDIA Cloud Functions API key
  • NGC_ORG: Your NGC organization name

These can be provided as environment variables or passed directly to the nvcf_task function.

Development

To set up the development environment:

# Clone the repository
git clone https://github.com/yourusername/flytekitplugins-nvcf.git
cd flytekitplugins-nvcf

# Install development dependencies
pip install -e ".[dev]"

# Install pre-commit hooks
pip install pre-commit
pre-commit install

# Run tests
pytest

Build Agent ContainerImage

docker buildx build -t flytekitagent:v1 -f Dockerfile .

About

A Flytekit plugin that enables running tasks on NVIDIA Cloud Functions (NVCF).

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published