Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 3 additions & 38 deletions public_dropin_environments/python311_genai_agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,16 @@ workflows using CrewAI, LangGraph, Llama-Index and other agentic workflows.
Additionally, this environment is fully compatible with `Codespaces` and `Notebooks` in the DataRobot platform.

## Supported Libraries

This environment is built for python 3 and has support for the following libraries.
For specific version information and the complete list of included packages, see [requirements](requirements.txt).

- crewai
- langgraph
- langchain
- llama-index
- openai
- numpy
- pandas
For specific version information and the complete list of included packages, see [pyproject.toml](pyproject.toml).

## Instructions

1. From the terminal, run `tar -czvf py_dropin.tar.gz -C /path/to/public_dropin_environments/python311_genai_agents/ .`
2. Using either the API or from the UI create a new Custom Environment with the tarball created
in step 1.
2. Using either the API or from the UI create a new Custom Environment with the tarball created in step 1.

_The Dockerfile.local should be used when customizing the Dockerfile or building locally._

### Creating models for this environment

To use this environment, your custom model archive will typically contain a `custom.py` file containing the necessary hooks, as well as other files needed for your workflow. You can implement the hook functions such as `load_model` and `score_unstructured`, as documented [here](../../custom_model_runner/README.md)

Within your `custom.py` code, by importing the necessary dependencies found in this environment, you can implement your Python code under the related custom hook functions, to build your GenAI workflows.

If you need additional dependencies, you can add those packages in your `requirements.txt` file that you include within your custom model archive and DataRobot will make them available to your custom Python code after you build the environment.

# Development

## Synchronizing `pyproject.toml` and other files with `af-component-agents` [Preferred method]
## [Development] Synchronizing `pyproject.toml` and other files with `af-component-agents` [Preferred method]
From within the `af-component-agents` repo run the following while replacing `path/to/` with the approprite path of your local environment:
```bash
task docker_update_reqs AGENT_PATH=/path/to/datarobot-user-models/public_dropin_environments/python311_genai_agents
Expand All @@ -46,17 +25,3 @@ This will:
- Synchronize the `pyproject.toml` to the latest unified requirements
- Upgrade the `uv.lock` file
- Update the `requirements.txt` file so it properly displays in the Execution Environment UI.

## Manually updating requirments.txt for proper display inside DataRobot:
Run the following from within the `python311_genai_agents` directory:
```bash
uv lock
uv sync
uv pip freeze > requirements.txt
```

## Manually updating the `uv.lock` file:
Run the following from within the `python311_genai_agents` directory:
```bash
uv lock --no-upgrade
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "This template environment can be used to create GenAI-powered agents using CrewAI, LangGraph, or Llama-Index. Similar to other drop-in environments, you can either include a .pth artifact or any other code needed to deserialize your model, and optionally a custom.py file. You can also use this environment in codespaces.",
"programmingLanguage": "python",
"label": "",
"environmentVersionId": "68fa3b33ce44a811c9116422",
"environmentVersionId": "68ff8b541f7d1c30b50ed595",
"environmentVersionDescription": "",
"isPublic": true,
"isDownloadable": true,
Expand All @@ -15,8 +15,8 @@
"contextUrl": "https://github.com/datarobot/datarobot-user-models/tree/master/public_dropin_environments/python311_genai_agents",
"imageRepository": "env-python-genai-agents",
"tags": [
"v11.2.0-68fa3b33ce44a811c9116422",
"68fa3b33ce44a811c9116422",
"v11.2.0-68ff8b541f7d1c30b50ed595",
"68ff8b541f7d1c30b50ed595",
"v11.2.0-latest"
]
}
10 changes: 5 additions & 5 deletions public_dropin_environments/python311_genai_agents/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name = "DockerContext"
version = "0.1.0"
description = "Implementation of DockerContext"
readme = "README.md"
requires-python = ">=3.10, <3.13"
requires-python = ">=3.11, <3.12"
dependencies = [
"annotated-types>=0.7.0",
"click>=8.1.8",
Expand Down Expand Up @@ -53,11 +53,11 @@ dependencies = [
"ujson<5.8.0",
"uwsgi>=2.0.30",

"nvidia-nat==1.3.0rc3; python_version >= '3.11'",
"nvidia-nat==1.3.0; python_version >= '3.11'",
# "nvidia-nat-llama-index==1.3.0rc3; python_version >= '3.11'",
"nvidia-nat-opentelemetry==1.3.0rc3; python_version >= '3.11'",
"nvidia-nat-crewai==1.3.0rc3; python_version >= '3.11'",
"nvidia-nat-langchain==1.3.0rc3; python_version >= '3.11'",
"nvidia-nat-opentelemetry==1.3.0; python_version >= '3.11'",
"nvidia-nat-crewai==1.3.0; python_version >= '3.11'",
"nvidia-nat-langchain==1.3.0; python_version >= '3.11'",

# Agent framework requirements

Expand Down
Loading