-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Bootstrap: docker | ||
From: debian:latest | ||
|
||
%labels | ||
MAINTAINER icaoberg | ||
EMAIL [email protected] | ||
SUPPORT [email protected] | ||
REPOSITORY http://gitub.com/pscedu/singularity-ncdu | ||
COPYRIGHT Copyright © 2021-2024 Pittsburgh Supercomputing Center. All Rights Reserved. | ||
VERSION 2.5 | ||
|
||
%post | ||
apt update | ||
apt install -y wget | ||
wget -nc https://dev.yorhel.nl/download/ncdu-2.5-linux-x86.tar.gz | ||
tar -xvf ncdu-2.5-linux-x86.tar.gz | ||
rm -f ncdu-2.5-linux-x86.tar.gz | ||
mv ncdu /usr/local/bin | ||
apt remove -y wget | ||
apt -y autoremove | ||
|
||
%runscript | ||
ncdu "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# Copyright © 2021-2024 Pittsburgh Supercomputing Center. | ||
# All Rights Reserved. | ||
|
||
IMAGE=singularity-ncdu-2.5.sif | ||
DEFINITION=Singularity | ||
|
||
if [ -f $IMAGE ]; then | ||
rm -fv $IMAGE | ||
fi | ||
|
||
singularity build $IMAGE $DEFINITION | ||
|
||
if [ -f $IMAGE ]; then | ||
exit 0 | ||
else | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
-- | ||
-- ncdu 2.5 modulefile | ||
-- | ||
-- "URL: https://www.psc.edu/resources/software" | ||
-- "Category: Other" | ||
-- "Description: ncdu is a disk usage analyzer with an ncurses interface." | ||
-- "Keywords: singularity utilities" | ||
|
||
whatis("Name: ncdu") | ||
whatis("Version: 2.5") | ||
whatis("Category: Other") | ||
whatis("Description: ncdu is a disk usage analyzer with an ncurses interface.") | ||
|
||
help([[ | ||
ncdu is a disk usage analyzer with an ncurses interface. | ||
To load the module, type | ||
> module load ncdu/2.5 | ||
To unload the module, type | ||
> module unload ncdu/2.5 | ||
Documentation | ||
------------- | ||
For help, type | ||
> ncdu --help | ||
Tools included in this module are | ||
* ncdu | ||
]]) | ||
|
||
local package = "ncdu" | ||
local version = "2.5" | ||
local base = pathJoin("/opt/packages",package,version) | ||
prepend_path("PATH", base) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
VERSION=2.5 | ||
PACKAGE=ncdu | ||
TOOL=$PACKAGE | ||
DIRECTORY=$(dirname $0) | ||
|
||
OPTIONS="" | ||
for STORAGE in "${STORAGES[@]}" | ||
do | ||
if [ -d "$STORAGE" ]; then | ||
OPTIONS=$OPTIONS" -B $STORAGE" | ||
fi | ||
done | ||
|
||
singularity exec $OPTIONS $DIRECTORY/singularity-$PACKAGE-$VERSION.sif $TOOL "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# Copyright © 2021-2024 Pittsburgh Supercomputing Center. | ||
# All Rights Reserved. | ||
|
||
IMAGE=singularity-ncdu-2.5.sif | ||
DEFINITION=Singularity | ||
|
||
if [ -f $IMAGE ]; then | ||
rm -fv $IMAGE | ||
fi | ||
|
||
singularity build --remote $IMAGE $DEFINITION | ||
|
||
if [ -f $IMAGE ]; then | ||
exit 0 | ||
else | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
echo "Listing files" | ||
tree . | ||
|
||
echo "Testing bat" | ||
singularity exec singularity-ncdu-2.5.sif ncdu --help |