Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
rawr

Vanessasaurus vsoch

💭
rawr
View GitHub Profile
@vsoch
vsoch / README.md
Created Jul 11, 2019
Apache with Singularity and without sudo
View README.md

Apache with Singularity

Start with this recipe

Bootstrap: docker
From:httpd:2.4.37
%startscript
httpd-foreground
@vsoch
vsoch / result.json
Last active Jul 11, 2019
Example of using the monitor_gpu decorator
View result.json
{
"commits": [
"7ea1152603baef5f0012905f321586399f816958"
],
"dates": [
"2019-07-11 09:51:36 -0700"
],
"content": [
{
"nvml_driver_version": "418.67",
View data.json
---
layout: null
excluded_in_search: true
permalink: /data.json
---
{
{% for post in site.pages %}{% unless post.excluded_in_search %}{% if added %},{% endif %}{% assign added = false %}
"{{ site.title | slugify }}-{{ post.url | slugify }}": {
"id": "{{ site.title | slugify }}-{{ post.url | slugify }}",
"title": "{{ site.title }}: {{ post.title | xml_escape }}",
@vsoch
vsoch / Dockerfile
Last active May 15, 2019
An example multistage Dockerfile to install gvim and then throw the extra stuff away!
View Dockerfile
FROM ubuntu:18.04 as base
# docker build -t vanessa/vim .
RUN apt-get update && apt-get install -y git \
gcc \
libncurses5-dev \
libncursesw5-dev \
build-essential
@vsoch
vsoch / result.json
Last active May 11, 2019
An example of using the watchme psutils decorator to monitor resource usage of a function
View result.json
[
{
"num_ctx_switches": {
"voluntary": 1,
"involuntary": 0
},
"ionice": {
"ioclass": "IOPRIO_CLASS_NONE",
"value": 4
},
@vsoch
vsoch / Singularity
Last active May 8, 2019
An example of setting a custom environment variable already defined in the container
View Singularity
Bootstrap: docker
From: centos:7
# sudo singularity build lamps.simg Singularity
%environment
now=`date '+%Y_%m_%d'`
hostname=`hostname`
APPNAME="lammps"
@vsoch
vsoch / output_file.md
Created May 4, 2019
Saving output to a file and printing to terminal
View output_file.md

This is executing a command to the container to list at the root (/) and then redirect stdout and stderr to "out.txt"

$ singularity exec salad_latest.sif ls / 2>&1 | tee out.txt
bin
code
dev
environment
etc
home
@vsoch
vsoch / analyze_ubuntu.md
Created May 3, 2019
Container Diff Examples
View analyze_ubuntu.md
$ container-diff analyze --type=apt ubuntu:16.04

-----Apt-----

Packages found in ubuntu:16.04:
NAME                        VERSION                              SIZE
-adduser                    3.113 nmu3ubuntu4                    648K
-apt                        1.2.31                               3.4M
-base-files                 9.4ubuntu4.8                         312K
@vsoch
vsoch / markdown-details.md
Last active May 1, 2019
An example of how to put a really long error log (or similar) in markdown! It's all about details. :)
View markdown-details.md

Lots of discussion, blardee boo, and here is my Dockerfile that is important to you!

FROM debian:stretch-backports

LABEL authors="@bnmnetp,@vsoch,@yarikoptic"

# docker build -t runstone/server .
@vsoch
vsoch / singularity-pull-examples.md
Last active Apr 25, 2019
All the ways you can pull a Singularity container from shub.
View singularity-pull-examples.md

Ways to Pull

How do you pull, my friend? Let me count the ways!

1. Pull by Tag

$ singularity pull shub://vsoch/singularity-images:latest
 35.30 MiB / 35.30 MiB [=========================================================================================================================================] 100.00% 4.07 MiB/s 8s
111
You can’t perform that action at this time.