Skip to content

ministryofjustice/analytical-platform-airflow-python-base

Repository files navigation

Analytical Platform Airflow Python Base

repo standards badge

Open in Dev Container

Open in GitHub Codespaces

This repository contains the code for building the Python base image used by Analytical Platform's Airflow service

Features

This image is built on Ubuntu 24.04 LTS and includes the following software:

  • AWS CLI

  • Python 3.12

  • NVIDIA CUDA drivers

Running Locally

Build

make build

Test

make test

Run

make run

Managing Software Versions

Ubuntu

Dependabot is configured to do this in .github/dependabot.yml, but if you need to get the digest, do the following

docker pull --platform linux/amd64 public.ecr.aws/ubuntu/ubuntu:24.04

docker image inspect --format='{{ index .RepoDigests 0 }}' public.ecr.aws/ubuntu/ubuntu:24.04

Base APT Packages

The latest versions of the APT packages can be obtained by running the following

docker run -it --rm --platform linux/amd64 public.ecr.aws/ubuntu/ubuntu:24.04

apt-get update

apt-cache policy ${PACKAGE} # for example curl, git or gpg

AWS CLI

Releases for AWS CLI are provided on GitHub

NVIDIA CUDA

The latest version of NVIDIA can be obtained by running:

docker run -it --rm --platform linux/amd64 public.ecr.aws/ubuntu/ubuntu:24.04

apt-get update

apt-get install --yes curl gpg

curl --location --fail-with-body \
  "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/3bf863cc.pub" \
  --output "3bf863cc.pub"

cat 3bf863cc.pub | gpg --dearmor --output nvidia.gpg

install -D --owner root --group root --mode 644 nvidia.gpg /etc/apt/keyrings/nvidia.gpg

echo "deb [signed-by=/etc/apt/keyrings/nvidia.gpg] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64 /" > /etc/apt/sources.list.d/cuda.list

apt-get update --yes

apt-cache policy cuda-cudart-12-6

apt-cache policy cuda-compat-12-6