Run the SWE-bench LLM benchmark on SUNK using Docker-in-Docker with GPU resources
SUNK StandardSUNK Self-ServiceSWE-bench is a benchmark for evaluating large language models on software issues collected from GitHub. SWE-bench uses Docker to create reproducible artifacts that can be ported to different platforms.This guide is for SUNK users who want to evaluate large language models against the SWE-bench suite on GPU-backed nodes. By the end of the guide, you have SWE-bench installed in a Python virtual environment on a SUNK node and a successful benchmark run that produces a JSON report.This guide explains how to run SWE-bench on SUNK with the following steps:
To run SWE-bench on SUNK, you first need to enable Docker support. For instructions, see the guide on using Docker in SUNK.
Using Docker in SUNK requires enabling privileged Pods and disabling the recommended AppArmor profile. This process grants elevated kernel capabilities and weakens isolation guarantees. See the known security risks section for more details.It is your responsibility to verify that third-party code is safe to execute alongside your other workloads.
To run SWE-bench in SUNK, select a node to run the benchmark on, set up a Python environment on that node, and then install SWE-bench in the Python environment.
SWE-bench needs an interactive shell on a GPU node so the benchmark harness can build Docker images and run evaluations against the GPU. First, identify a node or partition on which to run the benchmark. The following examples use an H100 node in the h100 partition.Choose one of the following methods:
Option 2: Start an interactive job within a Slurm login Pod
Use this option when you don’t already have a GPU Pod running and want Slurm to allocate one for the session. In this example, the Slurm login Pod is tenant-slurm-login-0:
With an interactive shell on a GPU node ready, you can install SWE-bench and run the benchmark. Clone SWE-bench and set up the Python environment. The following examples use uv to create a Python virtual environment. For venv and pip versions of this process, see the Python documentation.
Enabling privileged Pods on non-InfiniBand nodes may result in NCCL failing to use eth0 correctly. Privileged Pods expose InfiniBand devices that aren’t enabled on these nodes, and NCCL tries to use them. The HPC-X network plugin also loads by default when HPC-X is on the library path. For more information about plugin loading, see the NCCL configuration reference. To force NCCL to use eth0, set the following environment variables:
# Non-InfiniBand nodes only: pin NCCL and UCX to eth0 and disable CollNet.export NCCL_SOCKET_IFNAME=eth0export UCX_NET_DEVICES=eth0export NCCL_COLLNET_ENABLE=0export NCCL_IB_HCA=eth0