Getting Started with Chainguard's Dockerfile Converter
Learning Lab for August 2025 on DFC, a tool to convert Dockerfiles to use Chainguard Containers
Product Docs
Open Source
Compliance
Education
The July 2025 Learning Lab with Patrick Smyth covers AI with Hardened Container Images. In this session, learn how to secure AI workloads by reducing vulnerabilities in container images by over 90%. Patrick demonstrates hands-on techniques for training an animal detection model using PyTorch with hardened container images, creating minimal and secure deployments, and running AI frameworks with zero CVEs.
In the demo, Patrick trains and runs inference on an image classification model using PyTorch and Chainguard’s hardened container image. The model classifies images of octopuses, whales, and penguins, demonstrating how to work with AI workloads securely.
Demo Repository: PyTorch Getting Started
First, create a directory for the project and download the necessary files:
mkdir -p ~/image_classification && cd ~/image_classification && \
curl https://codeload.github.com/chainguard-dev/pytorch-getting-started/tar.gz/main | \
tar -xz --strip=1 pytorch-getting-started-main/
Then run the training script inside a Chainguard PyTorch container:
docker run --user root --rm -it \
--platform linux/amd64 \
-v "$PWD/:/home/nonroot/octopus-detector" \
cgr.dev/chainguard/pytorch:latest \
"/home/nonroot/octopus-detector/image_classification.py"
This command generates a model file named octopus_whale_penguin_model.pt
.
To test the trained model, first download a test image:
curl https://raw.githubusercontent.com/chainguard-dev/pytorch-getting-started/main/inference-images/octopus.jpg > ~/image_classification/octopus.jpg
Then run the classification:
cd ~/image_classification && \
docker run --user root --rm -it \
--platform linux/amd64 \
-v "$PWD:/home/nonroot/octopus-detector" \
cgr.dev/chainguard/pytorch:latest \
"/home/nonroot/octopus-detector/image_classification.py" \
"/home/nonroot/octopus-detector/octopus.jpg"
The demo showcases how Chainguard’s hardened PyTorch image provides the same functionality as traditional images while eliminating vulnerabilities and reducing the attack surface.
Learning Lab for August 2025 on DFC, a tool to convert Dockerfiles to use Chainguard Containers
Video and transcript of presentation at PyTorch 2024 on eliminating CVEs in the PyTorch image, drawing on best practices …
Learn how to use Chainguard's PyTorch container image for deep learning with enhanced security, minimal CVEs, and GPU …
Overview of Chainguard's package repositories, highlighting the different repositories and how to access them.
How to enforce best practices and ensure compliance with Kyverno.
Last updated: 2025-07-25 12:30