Open
Description
Hi,
We're using this repo in our build process and as a part of docker build
, we noticed a huge different in the resulting image size between arm
and amd64
architectures.
Here is a reproduction dockerfile:
FROM python:3.8-slim
# Install system dependencies
RUN apt-get update && apt-get install -y git
# Set work directory
WORKDIR /usr/src/app
# Copy only the requirements file, to cache the pip install step
RUN pip install --no-cache-dir --upgrade guardrails-ai
# Install specific tools
RUN guardrails hub install hub://tryolabs/restricttotopic
If you build this image from a Mac M1/M2 for example, the resulting image size will be around 1GB.
If you build it with the --platform=linux/amd64
flag, the size becomes 8GB.
This causes us a lot of trouble as it makes our CI pipeline very slow, and also requires us to dramatically increase our Kubernetes nodes' disk size, as we are using linux/amd64
in the cluster, as it is still the most common architecture. It takes several minutes to download the image to the cluster with every deployment.
Is this something you're able to address, please?
Metadata
Metadata
Assignees
Labels
No labels