pytorch/.ci/docker
Ethan Wee 651e6aacf9 [ROCm] Remove benign warning about missing amdgpu.ids (#147791)
Fixes #144203.

We build a custom libdrm when preparing our docker image.  We attempt to locate the amdgpu.ids file relative to the python binary, but this is not possible for venv installs of pytorch when the python binary is a symlink.  Not finding amdgpu.ids causes `torch.cuda.get_device_name()` to return "AMD Radeon Graphics" as a generic name instead of something specific such as "AMD Instinct MI250X / MI250".  The libdrm warning is noisy, so we are removing it.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/147791
Approved by: https://github.com/jeffdaily
2025-02-25 17:17:25 +00:00
..
almalinux Add safe.directory to Almalinux docker image (#140454) 2024-11-12 23:28:12 +00:00
centos-rocm Let aotriton.cmake detect the best binary package to use, and deprecate aotriton_version.txt (#137443) 2025-01-09 00:00:02 +00:00
ci_commit_pins Nccl update to 2.25.1 for cuda 12.4-12.8 (#146073) 2025-02-19 03:52:26 +00:00
common [ROCm] Remove benign warning about missing amdgpu.ids (#147791) 2025-02-25 17:17:25 +00:00
java
libtorch [ROCm] Add support for gfx1102 arch to wheel builds. (#147761) 2025-02-25 01:35:52 +00:00
linter Dockerize lint jobs (#94255) 2023-02-11 21:56:19 +00:00
linter-cuda Install magma from a tarball (#140417) 2024-12-05 15:20:58 +00:00
manywheel [ROCm] Add support for gfx1102 arch to wheel builds. (#147761) 2025-02-25 01:35:52 +00:00
ubuntu Install magma from a tarball (#140417) 2024-12-05 15:20:58 +00:00
ubuntu-cuda Update inductor jobs to use CUDA 12.4 (#142177) 2024-12-09 16:18:38 +00:00
ubuntu-rocm [ROCm] Enable inductor-periodic testing for MI300 (#144594) 2025-02-10 17:42:09 +00:00
ubuntu-xpu [CI] change conda to miniforge for XPU images (#134455) 2024-08-28 15:16:14 +00:00
build.sh [ROCm] Enable inductor-periodic testing for MI300 (#144594) 2025-02-10 17:42:09 +00:00
README.md Migrate conda, manywheel and libtorch docker builds to pytorch/pytorch (#129022) 2024-07-25 14:36:15 +00:00
requirements-ci.txt Unify all sympy versions to avoid conflicts within PyTorch (#147197) 2025-02-18 10:51:43 +00:00
requirements-docs.txt Revert "Fix deprecated pytorch_sphinx_theme editable installation (#145347)" 2025-01-23 20:06:07 +00:00
triton_version.txt [triton] Update pin for PyTorch 2.6/Triton 3.2 (#139206) 2024-11-22 18:34:32 +00:00

Docker images for GitHub CI and CD

This directory contains everything needed to build the Docker images that are used in our CI.

The Dockerfiles located in subdirectories are parameterized to conditionally run build stages depending on build arguments passed to docker build. This lets us use only a few Dockerfiles for many images. The different configurations are identified by a freeform string that we call a build environment. This string is persisted in each image as the BUILD_ENVIRONMENT environment variable.

See build.sh for valid build environments (it's the giant switch).

Docker CI builds

  • build.sh -- dispatch script to launch all builds
  • common -- scripts used to execute individual Docker build stages
  • ubuntu -- Dockerfile for Ubuntu image for CPU build and test jobs
  • ubuntu-cuda -- Dockerfile for Ubuntu image with CUDA support for nvidia-docker
  • ubuntu-rocm -- Dockerfile for Ubuntu image with ROCm support
  • ubuntu-xpu -- Dockerfile for Ubuntu image with XPU support

Docker CD builds

  • conda - Dockerfile and build.sh to build Docker images used in nightly conda builds
  • manywheel - Dockerfile and build.sh to build Docker images used in nightly manywheel builds
  • libtorch - Dockerfile and build.sh to build Docker images used in nightly libtorch builds

Usage

# Build a specific image
./build.sh pytorch-linux-bionic-py3.8-gcc9 -t myimage:latest

# Set flags (see build.sh) and build image
sudo bash -c 'PROTOBUF=1 ./build.sh pytorch-linux-bionic-py3.8-gcc9 -t myimage:latest