Skip to content

ministryofjustice/analytical-platform-cloud-development-environment-base

Repository files navigation

Analyical Platform Cloud Development Environment Base

repo standards badge

Open in GitHub Codespaces

This repository contains the code for building the base image used by Analytical Platform's Cloud Development Environments

Features

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

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

AWS SSO CLI

Releases for AWS SSO CLI are provided on GitHub

Miniconda

Releases for Miniconda are provided on docs.anaconda.com, from there we can use repo.anaconda.com to determine the artefact name and SHA256 based on a version. We currently use py312, Linux and x86_64variant.

Node.js

Releases for Node.js LTS are provided on nodejs.org

Amazon Corretto

The last version of Amazon Corretto 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://apt.corretto.aws/corretto.key" \
  --output corretto.key

cat corretto.key | gpg --dearmor --output corretto-keyring.gpg

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

echo "deb [signed-by=/etc/apt/keyrings/corretto-keyring.gpg] https://apt.corretto.aws stable main" > /etc/apt/sources.list.d/corretto.list

apt-get update --yes

apt-cache policy java-21-amazon-corretto-jdk

.NET SDK

The latest version of .NET SDK can be obtained by running:

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

apt-get update --yes

apt-cache policy dotnet-sdk-8.0

R

The latest version of .NET SDK can be obtained by running:

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

apt-get update --yes

curl --location --fail-with-body \
  "https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc" \
  --output "marutter_pubkey.asc"

cat marutter_pubkey.asc | gpg --dearmor --output marutter_pubkey.gpg

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

echo "deb [signed-by=/etc/apt/keyrings/marutter_pubkey.gpg] https://cloud.r-project.org/bin/linux/ubuntu noble-cran40/" > /etc/apt/sources.list.d/cran.list

apt-get update --yes

apt-cache policy r-base

Ollama

Releases for Ollama are maintained on GitHub.

Ollama don't currently provide SHA256 checksum for their installation file. For now, a checksum was acquired by running the following command locally:

curl --location --fail-with-body "https://github.com/ollama/ollama/releases/download/$(curl --silent https://api.github.com/repos/ollama/ollama/releases/latest | jq -r .tag_name)/ollama-linux-amd64.tgz" | sha256sum

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-5

apt-cache policy cuda-compat-12-5

Kubernetes CLI

We offer Kubernetes CLI as a way for users to connect to Cloud Platform, therefore the version needs to align with that they suggest in their documentation

Helm

Releases for Helm are maintained on GitHub.

Cloud Platform CLI

Releases for Cloud Platform CLI are maintained on GitHub.