1

Install Spack on Ubuntu 20.04

 2 years ago
source link: https://www.vultr.com/docs/install-spack-on-ubuntu-20-04
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
<?xml encoding="utf-8" ??>

Introduction

Spack is a package manager to install scientific packages such as The Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST) or PNGwriter. This guide explains how to install Spack on an Ubuntu 20.04 Vultr cloud instance.

Prerequisites

1. Install Dependencies

Install the build-essential.

$ sudo apt install build-essential

2. Clone Spack Repository

Clone the Spack repository to ~/.spack/Spack, or a directory of your choice.

$ git clone https://github.com/spack/spack ~/.spack/Spack

3. Add Shell Support

To use Spack everywhere, add Spack to PATH:

$ . ~/.spack/Spack/share/spack/setup-env.sh

To use the spack command every login, append that command to ~/.bash_profile:

$ echo '. ~/.spack/Spack/share/spack/setup-env.sh' >> ~/.bash_profile

Then run source ~/.bash_profile or log out to make changes take effect.

4. Clear Environment

Because Spack builds and installs packages from their source code, it requires a clean environment. Make sure your PATH only has the things you need.

$ echo $PATH
/home/cus/.spack/Spack/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

5. Test Spack

Verify the Spack installation.

$ spack -V
0.16.0-359-860825ee1

Next Steps

You can install lots of powerful scientific packages via Spack, such as pngwriter.

$ spack install pngwriter
$ spack load pngwriter

More Resources

Want to contribute?

You could earn up to $600 by adding new articles


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK