liveBook · Manning

Container image

As explained in LLMs in Production

A Docker image is an immutable package containing a filesystem and metadata used to create Docker containers.

A container image packages the software environment used to create a container. In GPU training setup, choosing an image is a separate decision from choosing the VM machine type: the image supplies the operating-system, Python, framework, and accelerator foundations. section 5.1.1

Use an image to:

  • Start from a prebuilt deep-learning environment instead of configuring every dependency yourself. section 5.1.1
  • Choose among Base, TensorFlow, and PyTorch images with compatible CUDA and Python versions. section 5.1.1
  • Customize a prebuilt image when the standard environment is only a starting point. section 5.1.1

A GPU-ready starting point

The image common-gpu-v20230925-debian-11-py310 provides a Debian 11 and Python 3.10 environment prepared for GPU use. It can be selected while creating a VM with a compatible machine type such as g2-standard-24. section 5.1.1

$ gcloud compute images list --project deeplearning-platform-release 
    --format=”value(NAME)” --no-standard-images

List available deep-learning images before choosing a framework, CUDA, and Python combination. section 5.1.1

$ INSTANCE_NAME="g2-llminprod-example"
    $ gcloud compute instances create ${INSTANCE_NAME} --zone=us-west1-a 
    --machine-type=g2-standard-24 --image-project=deeplearning-platform-release
    --image=common-gpu-v20230925-debian-11-py310 --boot-disk-size=200GB --scopes
    cloud-platform --metadata=install-unattended-upgrades=False,install-nvidia-
    driver=True --maintenance-policy TERMINATE --restart-on-failure

See the image selected directly in a gcloud VM-creation command. section 5.1.1

How LLMs in Production covers it

How deep it goes
Explains image selection and customization as setup choices, but stops short of detailing image construction.
Examples
Uses a Debian 11 Python 3.10 GPU image and gcloud commands for listing and creating instances.
What it assumes
Assumes gcloud initialization, project access, and a machine-type decision before selecting the image.
What you can do after
Operate GPU VM setup by discovering an image and assigning it during instance creation.
How it connects
Links container images with virtual machines, GPUs, CUDA, Python, Debian, TensorFlow, and PyTorch.

Also explained in

Compare how 25 books explain container image →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of LLMs in Production. The section links point to the parts of the book it draws on.