-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
84-add singularity guide #112
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super job man
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying it out with https://github.com/ci-for-research/example-python-1 repo with black check disabled in workflow. The jobs fails with incomplete job log and when I CTRL-C the singularity container, it errors with
---> Removing the runner.
Unhandled exception. System.IO.IOException: No space left on device
at System.IO.FileStream.WriteNative(ReadOnlySpan`1 source)
at System.IO.FileStream.FlushWriteBuffer()
at System.IO.FileStream.FlushInternalBuffer()
at System.IO.FileStream.Flush(Boolean flushToDisk)
at System.IO.FileStream.Flush()
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Flush()
at System.Diagnostics.TextWriterTraceListener.Flush()
at GitHub.Runner.Common.HostTraceListener.Write(String message)
at GitHub.Runner.Common.HostTraceListener.WriteHeader(String source, TraceEventType eventType, Int32 id)
at GitHub.Runner.Common.HostTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String message)
at GitHub.Runner.Common.Tracing.Trace(TraceEventType eventType, String message)
at GitHub.Runner.Common.HostContext..ctor(String hostType, String logFile)
at GitHub.Runner.Listener.Program.Main(String[] args)
./config.sh: line 79: 20881 Aborted (core dumped) ./bin/Runner.Listener "$@"
And keeps the runner (run.sh) running in the background.
Is this because my tmpfs has 1.6Gb available?
Alternatively, you can start it as an instance (service). | ||
|
||
```shell | ||
singularity instance start github-actions-runner-singularity.sif github-actions-runner --writable-tmpfs --bind ./env:/opt/actions-runner/.env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using temporary mode I get the log of the runner in my terminal. How do I get the log from running instance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added the info.
.github/workflows/super-linter.yml
Outdated
@@ -14,3 +14,4 @@ jobs: | |||
uses: docker://github/super-linter:v3 | |||
env: | |||
VALIDATE_ALL_CODEBASE: true | |||
VALIDATE_DOCKER: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why disable? ubuntu-docker/Dockerfile
should still be linted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i fiddled with this extensively see #127
Summary:
- one of our Dockerfiles uses the word
sudo
, to add a user to the sudo group. This seems to trigger the linter who thinks we aresudo
doing something. - disabling of rules is not very extensive in the linter, see https://github.com/github/super-linter/blob/master/docs/disabling-linters.md#dockerfile
- I tried
.dockerfilelintrc
withrules: sudo_usage: off
but that doesnt seem to be used correctly. Possibly due to https://github.com/github/super-linter/pull/384 - I tried the VALIDATE_DOCKER: false option, that disables linting on all files. Perhaps due to the counterintuitive way the defaults switch after adding one that see https://github.com/github/super-linter#environment-variables "However if any one of the variables are set, we default to leaving any unset variable to false"
- I made an issue to revisit this re-enable dockerfile linting after superlinter fix is released #128
Alternative approaches:
- avoid using sudo as a string in the Dockerfile, maybe using an env var or something.
- include all VALIDATE_[LANGUAGE] keys in the workflow file and setting them to true (excpet Docker)
Neither approach seems good, hence I decided to wait.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed sudo command from the Docker file
|
||
## Using on a HPC Cluster | ||
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you don't have root-permission on the HPC cluster you will need to build the github-actions-runner-singularity.sif file on your own machine and copy it to the cluster. Can a build+copy hint be added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added scp command
Co-authored-by: Stefan Verhoeven <[email protected]>
Co-authored-by: Stefan Verhoeven <[email protected]>
Co-authored-by: Stefan Verhoeven <[email protected]>
Co-authored-by: Stefan Verhoeven <[email protected]>
Co-authored-by: Stefan Verhoeven <[email protected]>
Refs: #84 #108 #17