Changes between Version 1 and Version 2 of cypress/SingularityDockerhub


Ignore:
Timestamp:
03/02/23 14:04:52 (21 months ago)
Author:
fuji
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • cypress/SingularityDockerhub

    v1 v2  
    1818singularity pull docker://ubuntu:14.04
    1919}}}
     20
     21=== Example : [https://github.com/moshi4/FastDTLmapper FastDTLmapper] ===
     22This tool requires many python packages and needs those to set up both python2 and python3. Fortunately, the developer provides Docker Images so we can use a Docker image and generate a Sigularity image.
     23
     24On Centos7 computing node, (need 'idev'),
     25{{{
     26module load singularity/3.9.0
     27singularity pull docker://ghcr.io/moshi4/fastdtlmapper:latest
     28}}}
     29This command creates ‘fastdtlmapper_latest.sif’, which is the Singularity Image. You can rename/transfer it as you like.
     30
     31To run it to show ‘help’,
     32{{{
     33singularity exec fastdtlmapper_latest.sif FastDTLmapper -h
     34}}}
     35
     36To run it with the minimum test dataset,
     37Assuming the example dataset is extracted under /lustre/project/group/user/fastdtlmapper, where 'group' is the group name and 'user' is the user name,
     38{{{
     39export SINGULARITYENV_TMPDIR=/tmp
     40export SINGULARITY_BINDPATH=/lustre/project/group/user:/home/user,$TMPDIR:/tmp
     41singularity exec fastdtlmapper_latest.sif FastDTLmapper -i fastdtlmapper/example/minimum_dataset/fasta/ -t fastdtlmapper/example/minimum_dataset/species_tree.nwk -o fastdtlmapper/output_minimum
     42}}}
     43
     44For Slurm batch jobs,
     45{{{
     46#!/bin/bash
     47#SBATCH --job-name=fastDLmapper # Job Name
     48#SBATCH --partition=centos7    # Partition
     49#SBATCH --qos=normal           # Quality of Service
     50#SBATCH --time=0-24:00:00      # Wall clock time limit in Days-HH:MM:SS
     51#SBATCH --nodes=1              # Node count required for the job
     52#SBATCH --ntasks-per-node=1    # Number of tasks to be launched per Node
     53#SBATCH --cpus-per-task=20     # Number of threads per task (OMP threads)
     54#SBATCH --output=try_fastDLmapper.out       ### File in which to store job output
     55#SBATCH --error=try_fastDLmapper.err        ### File in which to store job error messages
     56 
     57# Load Singularity module
     58module load singularity/3.9.0
     59 
     60# Set $TMPDIR in containar to /tmp, keeping $TMPDIR in host (/local/tmp/...)
     61export SINGULARITYENV_TMPDIR=/tmp
     62 
     63# Mount the lustre directory to home, $TMPDIR to /tmp
     64export SINGULARITY_BINDPATH=/lustre/project/group/user:/home/user,$TMPDIR:/tmp
     65 
     66# Run container
     67singularity exec fastdtlmapper_latest.sif FastDTLmapper -i fastdtlmapper/example/minimum_dataset/fasta/ -t fastdtlmapper/example/minimum_dataset/species_tree.nwk -o fastdtlmapper/output_minimum
     68}}}
     69