Sign inSign up

modular/max-cookbook

Verified Publisher

By Modular

Updated 10 months ago

Full-stack recipes built upon MAX + FastAPI + React. Runs on AMD + NVIDIA.

Image
1

606

modular/max-cookbook repository overview

The MAX Agentic Cookbook container provides a complete, ready-to-run environment that works across NVIDIA and AMD GPUs. It includes both the MAX model serving backend and a user-friendly web app full of interactive recipes.

This container is ideal for those who want to quickly deploy and explore production-ready GenAI app development patterns without complex setup. Recipes backends are built in Python with FastAPI while the frontend is a simple React web app. Code for each recipe is viewable directly within the web app.

Quick Start

You can run this container on a machine with a supported NVIDIA or AMD GPU using one of the following commands:

NVIDIA GPU:

docker run --gpus all \
  --env "MAX_MODEL=google/gemma-3-27b-it" \
  --env "HF_TOKEN=<secret>" \
  --env "HF_HUB_ENABLE_HF_TRANSFER=1" \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  -p 8000:8000 \
  -p 8010:8010 \
  modular/max-cookbook:nvidia

AMD GPU:

docker run \
  --group-add keep-groups \
  --rm \
  --env "MAX_MODEL=google/gemma-3-27b-it" \
  --env "HF_TOKEN=<secret>" \
  --env "HF_HUB_ENABLE_HF_TRANSFER=1" \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  -p 8000:8000 \
  -p 8010:8010 \
  --device /dev/kfd \
  --device /dev/dri \
  modular/max-cookbook:amd

Once running, navigate to http://localhost:8010 to access the interactive web app.

This container works with any MAX-optimized model from Hugging Face. To see a full list of top performing models, visit MAX Builds.

Configuration

  • Port 8000: MAX model serving API endpoint (OpenAI-compatible)
  • Port 8010: GenAI Cookbook web application
  • MAX_MODEL: Model to serve (e.g., google/gemma-3-27b-it)
  • HF_TOKEN: Your HuggingFace token for downloading models
  • Volume mount: Caches downloaded models in ~/.cache/huggingface

More Information

For more information on the MAX Agentic Cookbook and recipe development, visit MAX Agentic Cookbook on GitHub.

Tag summary

Content type

Image

Digest

sha256:1d1253534

Size

6.8 GB

Last updated

10 months ago

docker pull modular/max-cookbook:amd

This week's pulls

Pulls:

10

Last week