From f7a27c3d18bed592ad1e68d46d21bda0a19293a6 Mon Sep 17 00:00:00 2001 From: Ben Zhang Date: Sat, 28 Dec 2024 21:33:36 -0800 Subject: [PATCH] Pass through /dev/fuse to runner container When using `--writable-tmpfs` in nested apptainer, it requires a fuse device. This PR makes this available. --- allocation_scripts/apptainer.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/allocation_scripts/apptainer.sh b/allocation_scripts/apptainer.sh index e11a2cb..be673e4 100644 --- a/allocation_scripts/apptainer.sh +++ b/allocation_scripts/apptainer.sh @@ -54,9 +54,9 @@ export ACTIONS_RUNNER_IMAGE="/cvmfs/unpacked.cern.ch/ghcr.io/watonomous/actions- log "INFO Starting Apptainer container and configuring runner" -apptainer exec --writable-tmpfs --containall --fakeroot --bind /tmp/run/docker.sock:/tmp/run/docker.sock --bind /cvmfs:/cvmfs --bind /tmp:/tmp "$ACTIONS_RUNNER_IMAGE" /bin/bash -c "export DOCKER_HOST=unix:///tmp/run/docker.sock && export RUNNER_ALLOW_RUNASROOT=1 && export PYTHONPATH=/home/runner/.local/lib/python3.10/site-packages && /home/runner/config.sh --work \"${GITHUB_ACTIONS_WKDIR}\" --url \"${REPO_URL}\" --token \"${REGISTRATION_TOKEN}\" --labels \"${LABELS}\" --name \"slurm-${SLURMD_NODENAME}-${SLURM_JOB_ID}\" --unattended --ephemeral && /home/runner/run.sh && /home/runner/config.sh remove --token \"${REMOVAL_TOKEN}\"" +apptainer exec --writable-tmpfs --containall --fakeroot --bind /dev/fuse --bind /tmp/run/docker.sock:/tmp/run/docker.sock --bind /cvmfs:/cvmfs --bind /tmp:/tmp "$ACTIONS_RUNNER_IMAGE" /bin/bash -c "export DOCKER_HOST=unix:///tmp/run/docker.sock && export RUNNER_ALLOW_RUNASROOT=1 && export PYTHONPATH=/home/runner/.local/lib/python3.10/site-packages && /home/runner/config.sh --work \"${GITHUB_ACTIONS_WKDIR}\" --url \"${REPO_URL}\" --token \"${REGISTRATION_TOKEN}\" --labels \"${LABELS}\" --name \"slurm-${SLURMD_NODENAME}-${SLURM_JOB_ID}\" --unattended --ephemeral && /home/runner/run.sh && /home/runner/config.sh remove --token \"${REMOVAL_TOKEN}\"" log "INFO Runner removed (Duration: $(($end_time - $start_time)) seconds)" log "INFO allocate-ephemeral-runner-from-apptainer.sh finished, exiting..." -exit 0 \ No newline at end of file +exit 0