Skip to content

Commit d28ad73

Browse files
committed
Added version 3.1
1 parent 57a849c commit d28ad73

File tree

7 files changed

+150
-5
lines changed

7 files changed

+150
-5
lines changed

2.11.1/vd

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,22 @@ PACKAGE=visidata
55
TOOL=vd
66
DIRECTORY=$(dirname $0)
77

8-
PERSISTENT_FILE_STORAGE=/ocean
9-
if [ -d $PERSISTENT_FILE_STORAGE ]; then
10-
OPTIONS="-B $PERSISTENT_FILE_STORAGE"
8+
STORAGES=(/ocean /local)
9+
10+
OPTIONS=""
11+
for STORAGE in "${STORAGES[@]}"
12+
do
13+
if [ -d "$STORAGE" ]; then
14+
OPTIONS=$OPTIONS" -B $STORAGE"
15+
fi
16+
done
17+
18+
if id | grep -q hubmap && [ -d "/hive" ]; then
19+
OPTIONS=$OPTIONS" -B /hive"
1120
fi
1221

13-
if [ -d /local ]; then
14-
OPTIONS=$OPTIONS" -B /local"
22+
if id | grep -q bil && [ -d "/bil" ]; then
23+
OPTIONS=$OPTIONS" -B /bil"
1524
fi
1625

1726
singularity exec $OPTIONS $DIRECTORY/singularity-$PACKAGE-$VERSION.sif $TOOL "$@"

3.1/Singularity

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Bootstrap: docker
2+
From: python:3.8-alpine
3+
4+
%labels
5+
AUTHOR icaoberg
6+
7+
8+
REPOSITORY http://gitub.com/pscedu/singularity-visidata
9+
COPYRIGHT Copyright (c) 2024 Pittsburgh Supercomputing Center. All Rights Reserved.
10+
VERSION 3.1
11+
12+
%environment
13+
export TERM="xterm-256color"
14+
15+
%post
16+
apk update
17+
apk add git man-pages mandoc
18+
pip install requests python-dateutil wcwidth tabulate
19+
mkdir -p /opt/visidata
20+
git clone https://github.com/saulpw/visidata.git
21+
cd visidata
22+
git checkout tags/v3.1
23+
sh -c 'yes | pip install -vvv .'
24+
rm -rfv visidata
25+
26+
%runscript
27+
vd "$@"

3.1/build.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
# Copyright © 2021 Pittsburgh Supercomputing Center.
4+
# All Rights Reserved.
5+
6+
IMAGE=singularity-visidata-3.1.sif
7+
DEFINITION=Singularity
8+
9+
if [ -f $IMAGE ]; then
10+
rm -fv $IMAGE
11+
fi
12+
13+
apptainer build $IMAGE $DEFINITION
14+
15+
if [ -f $IMAGE ]; then
16+
exit 0
17+
else
18+
exit 1
19+
fi

3.1/modulefile.lua

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
--
2+
-- visidata 2.8 modulefile
3+
--
4+
-- "URL: https://www.psc.edu/resources/software"
5+
-- "Category: Other"
6+
-- "Description: VisiData is an interactive multitool for tabular data."
7+
8+
whatis("Name: visidata")
9+
whatis("Version: 2.8")
10+
whatis("Category: Other")
11+
whatis("URL: https://www.psc.edu/resources/software")
12+
whatis("Description: VisiData is an interactive multitool for tabular data.")
13+
14+
help([[
15+
VisiData is an interactive multitool for tabular data.
16+
17+
To load the module type
18+
19+
> module load visidata/2.8
20+
21+
To unload the module type
22+
23+
> module unload visidata/2.8
24+
25+
Tools included in this module are
26+
27+
* vd
28+
]])
29+
30+
local package = "visidata"
31+
local version = "2.8"
32+
local base = pathJoin("/opt/packages",package,version)
33+
prepend_path("PATH", base)
34+
prepend_path("MANPATH", base)

3.1/rbuild.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# Copyright (c) 2024 Pittsburgh Supercomputing Center.
4+
# All Rights Reserved.
5+
6+
IMAGE=singularity-visidata-3.1.sif
7+
DEFINITION=Singularity
8+
9+
if [ -f $IMAGE ]; then
10+
rm -fv $IMAGE
11+
fi
12+
13+
module load SingularityCE/4.1.2.lua
14+
singularity build --remote $IMAGE $DEFINITION
15+
16+
if [ -f $IMAGE ]; then
17+
exit 0
18+
else
19+
exit 1
20+
fi

3.1/test.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
set -x
4+
5+
shopt -s expand_aliases
6+
7+
DIRECTORY=$(pwd)
8+
alias vd='singularity exec "$DIRECTORY"/singularity-visidata-2.8.sif vd'
9+
10+
tree .

3.1/vd

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
VERSION=3.1
4+
PACKAGE=visidata
5+
TOOL=vd
6+
DIRECTORY=$(dirname $0)
7+
8+
PERSISTENT_FILE_STORAGE=/ocean
9+
if [ -d $PERSISTENT_FILE_STORAGE ]; then
10+
OPTIONS="-B $PERSISTENT_FILE_STORAGE"
11+
fi
12+
13+
if [ -d /local ]; then
14+
OPTIONS=$OPTIONS" -B /local"
15+
fi
16+
17+
if id | grep -q "hubmap"; then
18+
OPTIONS=$OPTIONS" -B /hive"
19+
fi
20+
21+
if id | grep -q "bil"; then
22+
OPTIONS=$OPTIONS" -B /bil"
23+
fi
24+
25+
singularity exec $OPTIONS $DIRECTORY/singularity-$PACKAGE-$VERSION.sif $TOOL "$@"
26+

0 commit comments

Comments
 (0)