Skip to main content

GPU Enabled Workloads

This feature is currently experimental

The Analytical Platform has made NVIDIA GPUs available for use on the new compute clusters

We offer AWS’ G5 instance family which comes with up to 8 NVIDIA A10G GPUs

You will need to do the following to use a GPU:

  1. Ensure your DAG has been migrated (migration guidance)

  2. Add the compute profile code to your DAG

    from imports.analytical_platform_compute_profiles import get_compute_profile
    
    compute_profile = get_compute_profile(compute_profile="gpu-spot-4vcpu-16gb")
    
    task = KubernetesPodOperator (
        ...
        tolerations=compute_profile["tolerations"],
        affinity=compute_profile["affinity"],
        container_resources=compute_profile["container_resources"],
        security_context=compute_profile["security_context"]
        ...
    )
    

    An example of this is available here

  3. Switch your Airflow container to use Analytical Platform’s new Python base image

    FROM ghcr.io/ministryofjustice/analytical-platform-airflow-python-base:1.0.0
    

    An example of this is available here

This page was last reviewed on 27 August 2024. It needs to be reviewed again on 27 November 2024 by the page owner #analytical-platform .
This page was set to be reviewed before 27 November 2024 by the page owner #analytical-platform. This might mean the content is out of date.