From aa48f4c73294defb1612c95a6f0573cf6918ca98 Mon Sep 17 00:00:00 2001 From: Faruk D Date: Fri, 2 Oct 2020 15:40:26 +0200 Subject: [PATCH] fixes about the PR comments --- ubuntu-docker/Dockerfile | 14 +++++++------- ubuntu-singularity/README.md | 19 +++++++++++++++++++ .../github-actions-runner-singularity.def | 2 +- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/ubuntu-docker/Dockerfile b/ubuntu-docker/Dockerfile index 5e17304..59af782 100644 --- a/ubuntu-docker/Dockerfile +++ b/ubuntu-docker/Dockerfile @@ -8,16 +8,16 @@ ENV RUNNER_VERSION=2.267.1 ENV AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache RUN apt-get update && \ - apt-get install -y --no-install-recommends ca-certificates \ - curl \ - jq \ - libcurl4-openssl-dev \ - sudo \ - tar && \ + apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + jq \ + libcurl4-openssl-dev \ + tar && \ rm -rf /var/lib/apt/lists/* RUN printf "\n\033[0;44m---> Creating SSH user.\033[0m\n" -RUN useradd -rm -d /home/${DOCKER_USER} -s /bin/bash -G sudo -u 1001 ${DOCKER_USER} +RUN useradd -rm -d /home/${DOCKER_USER} -s /bin/bash -G ${DOCKER_USER} -u 1001 ${DOCKER_USER} RUN echo "${DOCKER_USER}:${DOCKER_PASS}" | chpasswd WORKDIR /home/${DOCKER_USER}/actions-runner diff --git a/ubuntu-singularity/README.md b/ubuntu-singularity/README.md index 57e7e52..fc4e479 100644 --- a/ubuntu-singularity/README.md +++ b/ubuntu-singularity/README.md @@ -137,10 +137,29 @@ Singularity containers by-default starts in ``read-only`` mode so you cannot mak If you stop the running container or interrupt it by pressing to ``CTRL+C``, the Github actions runner will stop and it will be unregistered from your Github repository. +#### Accessing the logs + +The singularity instances save the logs in +`~/.singularity/instances/logs/INSTANCE_NAME` folder. + ## Using on a HPC Cluster +In most of the cases, the HPC user does not have root persmissions s it wont be possible to build the Singularity image. The Singularity image can be built locally and copied to +the cluster. We will use `scp` command to copy the singularity image. + +```shell +scp github-actions-runner-singularity.sif USERNAME@CLUSTER_IP_ADDRESS:$REMOTE_FOLDER +``` + +The `$REMOTE_FOLDER` is typically your home folder which you can figure out using the command below. + +```shell +echo $HOME +``` + In oder to use the Singularity image on a HPC cluster, we first need to create a jobscript. The job script will be handled by the scheduler and eventually it will set up the runner when it is executed. + Example: ``` #!/bin/bash diff --git a/ubuntu-singularity/github-actions-runner-singularity.def b/ubuntu-singularity/github-actions-runner-singularity.def index 97ea35e..91a11c0 100644 --- a/ubuntu-singularity/github-actions-runner-singularity.def +++ b/ubuntu-singularity/github-actions-runner-singularity.def @@ -1,5 +1,5 @@ Bootstrap: library -From: ubuntu:19.10 +From: ubuntu:20.04 Stage: build