-
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
Ivan Cao-Berg
committed
Feb 20, 2023
1 parent
e26d89d
commit 910f01d
Showing
6 changed files
with
120 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,20 @@ | ||
Bootstrap: docker | ||
From: debian:latest | ||
|
||
%labels | ||
MAINTAINER icaoberg | ||
EMAIL [email protected] | ||
SUPPORT [email protected] | ||
REPOSITORY http://gitub.com/pscedu/singularity-ncdu | ||
COPYRIGHT Copyright © 2021-2023 Pittsburgh Supercomputing Center. All Rights Reserved. | ||
VERSION 2.2.2 | ||
|
||
%post | ||
apt update | ||
apt install -y wget | ||
wget -nc https://dev.yorhel.nl/download/ncdu-2.2.1-linux-x86_64.tar.gz | ||
tar -xvf ncdu-2.2.1-linux-x86_64.tar.gz | ||
rm -f ncdu-2.2.1-linux-x86_64.tar.gz | ||
mv ncdu /usr/local/bin | ||
apt remove -y wget | ||
apt -y autoremove |
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 Pittsburgh Supercomputing Center. | ||
# All Rights Reserved. | ||
|
||
IMAGE=singularity-ncdu-2.2.2.sif | ||
DEFINITION=Singularity | ||
|
||
if [ -f $IMAGE ]; then | ||
rm -fv $IMAGE | ||
fi | ||
|
||
sudo 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.2.2 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.2.2") | ||
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.2.2 | ||
To unload the module, type | ||
> module unload ncdu/2.2.2 | ||
Documentation | ||
------------- | ||
For help, type | ||
> ncdu --help | ||
Tools included in this module are | ||
* ncdu | ||
]]) | ||
|
||
local package = "ncdu" | ||
local version = "2.2.2" | ||
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.2.2 | ||
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 Pittsburgh Supercomputing Center. | ||
# All Rights Reserved. | ||
|
||
IMAGE=singularity-ncdu-2.2.2.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.2.2.sif ncdu --help |