Skip to content

Instantly share code, notes, and snippets.

View natefoo's full-sized avatar

Nate Coraor natefoo

View GitHub Profile
@natefoo
natefoo / default_tool.yml
Created November 18, 2022 04:33
TPV default tool with resource selector for cluster
# https://github.com/natefoo/total-perspective-vortex/tree/resource-params
global:
default_inherits: default
tools:
default:
cores: 1
mem: cores * 3.9
env: {}
scheduling:
@natefoo
natefoo / 00_default_tool.yml
Created November 17, 2022 15:07
TPV Testing
global:
default_inherits: default
tools:
default:
cores: 1
mem: cores * 3.9
env: {}
context:
partition: normal
@natefoo
natefoo / 00README.md
Created November 1, 2022 19:23
Scan Singularity images for files

I created this to search BioContainers images for https://github.com/NCSC-NL/OpenSSL-2022 before it turned out that the bug is probably practically unexploitable, but should be useful in the future if we have another such case:

$ $HOME/bin/scan-singularity.sh -d 2021-09-01 -i /singularity -l ./log -s $HOME '/usr/local/conda-meta/openssl-3\..*'

For my own personal notes, I ran this on a manually-created LX-Brand CentOS 7 VM (alias: singularity-scan) on rochefort with the singularity zfs dataset lofs-mounted in. From there you can install epel-release and singularity-runtime, which can work with sif files (even though it can't run them in LX). tmpfs created with:

# useradd -d /home/scan -m -s /bin/bash scan
name: galaxy_training_material
channels:
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=2_gnu
- binutils_impl_linux-64=2.36.1=h193b22a_2
- ca-certificates=2022.6.15=ha878542_0
- gcc=12.1.0=h9ea6d83_10
#!/bin/bash
# stopgap to build mod_zip DSO for nginx-galaxy before that package goes away entirely
set -euo pipefail
nginx_version='1.12.2'
upload_module_version='2.255-nfs'
auth_pam_module_version='1.4'
mod_zip_version='808fb55e7235a201ea862e02dab612b87787d5a4'
gid=$(id -g)
uid=$(id -u)
---
# Manage static Galaxy configuration files
- name: Static config setup
block:
- name: Ensure Galaxy version is set
include_tasks: _inc_galaxy_version.yml
when: __galaxy_major_version is undefined
import os
import subprocess
import time
from datetime import (
date,
datetime,
)
import click
import psutil
#!/usr/bin/env python3
import os
import traceback
import click
from rich import progress
from tusclient.fingerprint import fingerprint
from bioblend import ConnectionError
from bioblend.galaxy import GalaxyInstance
#!/usr/bin/env python3
# Quick and dirty script to update usegalaxy-tools with missing tools fron GTN trainings. Note that this installs the
# newest versions of things, not necessarily the version specified in the training json.
import argparse
import os
import pathlib
import string
import subprocess
import sys
@natefoo
natefoo / conda-build.md
Last active June 16, 2025 17:03
Galaxy/BioContainers mulled container command line utilities

Local conda builds

In order to test updated or new conda packages you may need to build them locally and then build the container image from those. Here's a process for doing that.

  1. Set up conda-build as per instructions. I use a standalone Miniforge install for this.

  2. Build your package:

    $ cd biocnda-recpies/recipes