-
Notifications
You must be signed in to change notification settings - Fork 0
Getting started
Getting started with EasyBuild is really easy: just follow these steps and you can start building software with EasyBuild yourself.
- Step 1: Configure EasyBuild
- Step 2: Test configuration
- Step 3: Set up compiler toolkit
- Step 4: Build software with toolkit
- Step 5: Load module and use software
## Step 1: Configure EasyBuild
The first step consists of configuring EasyBuild: see Configuration for full details if you haven't done this yet.
Do make sure you also extend the MODULEPATH
environment variables with <installPath>/modules/all
before continuing to make sure that EasyBuild is able to resolve dependencies.
Once you have EasyBuild configured, you can test your configuration by installing a simple software package.
A good example is the open-source software package gzip
.
Follow these steps to build your first software package using EasyBuild:
Download the gzip
source tarball from http://www.gzip.org/ to the source path you configured EasyBuild with, in a subdirectory named gzip
or g/gzip
.
Create a .eb specification file named gzip.eb
, with contents as shown below, anywhere on your system (for example, in your home directory):
name = 'gzip'
version = '1.4'
homepage = 'http://www.gnu.org/software/gzip/'
description = "gzip (GNU zip) is a popular data compression program as a replacement for compress"
# dummy toolkit, rely on system C compiler
toolkit = {'name':'dummy','version':'dummy'}
# source tarball filename
sources = ['%s-%s.tar.gz'%(name,version)]
# make sure the gzip and gunzip binaries are available after installation
sanityCheckPaths = { 'files':["bin/gunzip", "bin/gzip"], 'dirs':[] }
Make sure the specified version
corresponds with the version of gzip
you downloaded in step 2.1.
Note that the specification file is basically just Python code.
Run EasyBuild, and specify the location of the gzip.eb
files you created in step 2.2:
<path>/easybuild/easybuild.sh gzip.eb
EasyBuild uses compiler toolkits to build software. These consist a (set of) compiler(s) to build software, and a set of libraries to provide extra functionality (e.g., MPI support, BLAS and/or LAPACK routines, etc.).
In the previous step, a dummy compiler toolkit was used. Therefore, EasyBuild depended on the compilers and libraries provided by the system. For various reasons, this is not the best possible scenario. First, if system updates are performed (either by you or a system administrator), then the compiler and its assorted libraries may be upgraded, potentially breaking existing software builds. Second, reproducing a build with the exact same compiler and library versions of installed software packages may become quite difficult if you rely on the system compiler and system libraries for building.
Therefore, the first time you use EasyBuild, you should start by constructing your preferred compiler toolkit(s). Note that there is no problem using several toolkits next to each other.
For more details, we refer to the compiler toolkits wiki page.
## Step 4: Build a software package using a compiler toolkitAfter putting together your own compiler toolkit, you can try installing gzip
using that toolkit.
Note that EasyBuild will install a whole new build of gzip when doing this, without removing or overwriting the previous build using the dummy toolkit.
To build and install gzip
using your freshly installed toolkit, simply adjust the toolkit
variable in the gzip.eb
specification file, detailing the name and version of your toolkit. For example:
toolkit = {'name':'myToolkit','version':'1.2.3'}
You can now load the module created by EasyBuild to start using gzip
built with your own compiler toolkit:
module load gzip/1.4-myToolkit-1.2.3
Congratulations, you've just mastered the basics of EasyBuild!
You can now start using EasyBuild to build your favorite set of software packages.
For a detailed example of setting up a compiler toolkit and using it, see the step-by-step demo.
More advanced topics include: