Skip to content

Commit

Permalink
fixes about the PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fdiblen committed Oct 2, 2020
1 parent 6c7e7f9 commit aa48f4c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
14 changes: 7 additions & 7 deletions ubuntu-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
19 changes: 19 additions & 0 deletions ubuntu-singularity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ubuntu-singularity/github-actions-runner-singularity.def
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Bootstrap: library
From: ubuntu:19.10
From: ubuntu:20.04
Stage: build


Expand Down

0 comments on commit aa48f4c

Please sign in to comment.