Skip to content

Commit

Permalink
Add lua for paste 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-Eagles committed May 19, 2023
1 parent b87fdbe commit b9dcd59
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions paste/1.3.0.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
help([[
This module loads paste 1.3.0 for python 3.8.3.
]])

if not string.match(os.getenv("HOSTNAME"),"compute") and not string.match(os.getenv("HOSTNAME"),"transfer") then
LmodError("\
This package can only be loaded on a compute or transfer node. Please use qrsh to connect to a valid compute or transfer node.")
end

if (mode() == "load") then
LmodMessage("Loading LIBD module for paste/1.3.0")
elseif (mode() == "unload") then
LmodMessage("Unloading LIBD module for paste/1.3.0")
end

load('python/3.8.3')

-- Directly activate or deactivate the python virtual environment
execute {cmd="source /jhpce/shared/jhpce/libd/paste/1.3.0/paste_venv/bin/activate", modeA={"load"}}
execute {cmd="deactivate", modeA={"unload"}}

0 comments on commit b9dcd59

Please sign in to comment.