A Flytekit plugin that enables running tasks on NVIDIA Cloud Functions (NVCF).
pip install flytekitplugins-nvcf
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
The plugin requires the following configuration:
NVCF_API_KEY
: Your NVIDIA Cloud Functions API keyNGC_ORG
: Your NGC organization name
These can be provided as environment variables or passed directly to the nvcf_task
function.
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
docker buildx build -t flytekitagent:v1 -f Dockerfile .