Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Lmod installation instructions #605

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 31 additions & 19 deletions docs/Installing-Lmod-without-root-permissions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,25 @@ Installing Lmod without root permissions
========================================

This short guide will show how to install Lmod (and Lua, on which it
depends) on Linux, without requiring root permissions.
depends) on Linux, without requiring root permissions.
For full instructions on installing Lmod and its prerequisites check
the `Lmod documentation<https://lmod.readthedocs.io/en/latest/030_installing.html>`_.

Lua
~~~

Build and install Lua using the source tarball available in the Lmod
SourceForge repository (`http://sourceforge.net/projects/lmod/files/`_).
Build and install Lua using the source tarball available in the `Lmod
SourceForge repository<https://sourceforge.net/projects/lmod/files/>`_.
This version is a lot easier to build, and already includes the required
extra Lua modules. At the time of writing this relates to the
``lua-5.1.4.8.tar.gz`` tarball.
``lua-5.1.4.9.tar.bz2`` tarball.

**Step 1**: Download and unpack `lua-5.1.4.8.tar.gz`_.
**Step 1**: Download and unpack Lua:

.. code:: bash

wget https://sourceforge.net/projects/lmod/files/lua-5.1.4.9.tar.bz2
tar xf lua-5.1.4.9.tar.bz2 && cd lua-5.1.4.9

**Step 2**: Configure the Lua build, provide a custom installation
prefix (e.g. ``$HOME/lua``) and specify to statically link libraries
Expand Down Expand Up @@ -51,43 +58,48 @@ Lmod
~~~~

**Step 1**: Download and unpack the latest available Lmod version,
`Lmod-6.1.tar.bz2`_ at the time of writing.
8.3.1 at the time of writing, from `the Github releases page
<https://github.com/TACC/Lmod/releases>`_.

.. code:: bash

tar xfvj Lmod-6.1.tar.bz2 && cd Lmod-6.1
wget https://github.com/TACC/Lmod/archive/8.3.1.tar.gz
tar xf 8.3.1.tar.gz && cd Lmod-8.3.1

**Step 2**: Configure, build and install Lmod build, in a custom prefix:

.. code:: bash

./configure --prefix=$HOME && make install

**Step 3**: Update ``$PATH`` so ``lmod`` is available (put this in your
``.bashrc``):
**Step 3**: Update ``$LMOD_CMD`` to point to the Lmod executable
(put this in your ``.bashrc``):

.. code:: bash

export LMOD_CMD=$HOME/lmod/lmod/libexec/lmod

Note that you can also use the specific version but the ``lmod``
directoy symlink above allows updates without changing this export:

.. code:: bash

export PATH=$HOME/lmod/6.1/libexec:$PATH
export LMOD_CMD=$HOME/lmod/8.3.1/libexec/lmod


Optionally, give it a spin:

.. code:: bash

$ lmod --version
$ $LMOD_CMD --version

Modules based on Lua: Version 6.1 2016-02-05 16:31
Modules based on Lua: Version 8.3.1 2020-02-16 19:46 :z
by Robert McLay [email protected]

**Step 4**: Define ``module`` function to use ``lmod`` (optional for use
with EasyBuild):

.. code:: bash

source $HOME/lmod/6.1/init/bash
export LMOD_CMD=$HOME/lmod/6.1/libexec/lmod

.. _`http://sourceforge.net/projects/lmod/files/`: http://sourceforge.net/projects/lmod/files/
.. _lua-5.1.4.8.tar.gz: http://sourceforge.net/projects/lmod/files/lua-5.1.4.8.tar.gz/download
.. _Lmod-6.1.tar.bz2: http://sourceforge.net/projects/lmod/files/Lmod-6.1.tar.bz2/download

source $HOME/lmod/lmod/init/bash