Skip to content

Docker container for AgentIQ #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 9, 2025

Conversation

dagardner-nv
Copy link
Contributor

@dagardner-nv dagardner-nv commented Apr 4, 2025

Description

  • Provides a minimal Dockerfile with AgentIQ installed from pypi, along with a build script.

Closes #86

Usage

Build

./docker/build_container.sh

Run

docker run --rm -ti --net=host \
  -v $(pwd)/examples/simple_calculator:/app \
  -e NVIDIA_API_KEY=$NVIDIA_API_KEY \
  -e PYTHONPATH=/app/src \
  agentiq:v1.0.0-rc9 \
  run --config_file /app/configs/config.yml --input "Is the product of 2 * 4 greater than the current hour of the day?

Serve

docker run --rm -ti --net=host \
  -v $(pwd)/examples/simple_calculator:/app \
  -e NVIDIA_API_KEY=$NVIDIA_API_KEY \
  -e PYTHONPATH=/app/src \
  agentiq:v1.0.0-rc9 \
  serve --config_file /app/configs/config.yml

Eval

docker run --rm -ti --net=host \
  -v $(pwd):/app \
  -e NVIDIA_API_KEY=$NVIDIA_API_KEY \
  --workdir /app \
  agentiq:v1.0.0-rc9 \
  eval --config_file examples/agents/react/configs/config.yml

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
    • Any contribution which contains commits that are not Signed-Off will not be accepted.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
@dagardner-nv dagardner-nv self-assigned this Apr 4, 2025
@dagardner-nv dagardner-nv requested a review from a team as a code owner April 4, 2025 22:22
@dagardner-nv dagardner-nv marked this pull request as draft April 4, 2025 22:22
@dagardner-nv dagardner-nv added feature request New feature or request non-breaking Non-breaking change labels Apr 4, 2025
@dagardner-nv dagardner-nv marked this pull request as ready for review April 8, 2025 19:29
Copy link
Collaborator

@mdemoret-nv mdemoret-nv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a .dockerignore file? We dont use COPY anywhere so I dont think it would change the container in any way but could speed up the build by ignoring some files we definitely dont need.

@dagardner-nv
Copy link
Contributor Author

Do we have a .dockerignore file? We dont use COPY anywhere so I dont think it would change the container in any way but could speed up the build by ignoring some files we definitely dont need.

We do have one at the root of the repo.

@dagardner-nv
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit f90e16f into NVIDIA:develop Apr 9, 2025
10 checks passed
@dagardner-nv dagardner-nv deleted the david-eval-docker-86 branch April 9, 2025 16:34
ericevans-nv pushed a commit to ericevans-nv/agent-iq that referenced this pull request Apr 14, 2025
* Provides a minimal `Dockerfile` with AgentIQ installed from pypi, along with a build script.

Closes NVIDIA#86

## Usage

### Build
```bash
./docker/build_container.sh
```

### Run
```bash
docker run --rm -ti --net=host \
  -v $(pwd)/examples/simple_calculator:/app \
  -e NVIDIA_API_KEY=$NVIDIA_API_KEY \
  -e PYTHONPATH=/app/src \
  agentiq:v1.0.0-rc9 \
  run --config_file /app/configs/config.yml --input "Is the product of 2 * 4 greater than the current hour of the day?
```

### Serve
```bash
docker run --rm -ti --net=host \
  -v $(pwd)/examples/simple_calculator:/app \
  -e NVIDIA_API_KEY=$NVIDIA_API_KEY \
  -e PYTHONPATH=/app/src \
  agentiq:v1.0.0-rc9 \
  serve --config_file /app/configs/config.yml
```

### Eval
```bash
docker run --rm -ti --net=host \
  -v $(pwd):/app \
  -e NVIDIA_API_KEY=$NVIDIA_API_KEY \
  --workdir /app \
  agentiq:v1.0.0-rc9 \
  eval --config_file examples/agents/react/configs/config.yml
```

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AgentIQ/blob/develop/docs/source/advanced/contributing.md).
- We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
  - Any contribution which contains commits that are not Signed-Off will not be accepted.
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

Authors:
  - David Gardner (https://github.com/dagardner-nv)

Approvers:
  - Michael Demoret (https://github.com/mdemoret-nv)

URL: NVIDIA#87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA]: Provide a docker container for running evaluation and profiling against a remote workflow
2 participants