-
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
116 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,14 @@ | ||
Bootstrap: docker | ||
From: alpine:edge | ||
|
||
%labels | ||
MAINTAINER icaoberg | ||
EMAIL [email protected] | ||
SUPPORT [email protected] | ||
REPOSITORY https://github.com/pscedu/singularity-asciinema | ||
COPYRIGHT Copyright © 2021-2022 Pittsburgh Supercomputing Center. All Rights Reserved. | ||
VERSION 2.2.0 | ||
|
||
%post | ||
apk update | ||
apk add asciinema |
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,18 @@ | ||
#!/bin/bash | ||
|
||
VERSION=2.2.0 | ||
PACKAGE=asciinema | ||
TOOL=$PACKAGE | ||
DIRECTORY=$(dirname $0) | ||
|
||
STORAGES=(/ocean /bil /hive /local) | ||
|
||
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-2022 Pittsburgh Supercomputing Center. | ||
# All Rights Reserved. | ||
|
||
IMAGE=singularity-asciinema-2.2.0.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,41 @@ | ||
-- | ||
-- asciinema 2.2.0 modulefile | ||
-- | ||
-- "URL: https://www.psc.edu/resources/software" | ||
-- "Category: Other" | ||
-- "Description: asciinema is a free and open source solution for recording terminal sessions and sharing them on the web." | ||
-- "Keywords: singularity utilities" | ||
|
||
whatis("Name: asciinema") | ||
whatis("Version: 2.2.0") | ||
whatis("Category: Other") | ||
whatis("URL: https://www.psc.edu/resources/software") | ||
whatis("Description: asciinema is a free and open source solution for recording terminal sessions and sharing them on the web.") | ||
|
||
help([[ | ||
Description | ||
----------- | ||
asciinema is a free and open source solution for recording terminal sessions and sharing them on the web. | ||
To load the module type | ||
> module load asciinema/2.2.0 | ||
To unload the module type | ||
> module unload asciinema/2.2.0 | ||
Documentation | ||
------------- | ||
For help, type | ||
> asciinema --help | ||
Tools included in this module are | ||
* asciinema | ||
]]) | ||
|
||
local package = "asciinema" | ||
local version = "2.2.0" | ||
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,19 @@ | ||
#!/bin/bash | ||
|
||
# Copyright © 2021-2022 Pittsburgh Supercomputing Center. | ||
# All Rights Reserved. | ||
|
||
IMAGE=singularity-asciinema-2.2.0.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,5 @@ | ||
#!/bin/bash | ||
|
||
tree . | ||
|
||
singularity exec singularity-asciinema-2.2.0.sif asciinema --help |