# Using the stack on lsst-dev

**URL:** <https://www.rubin.community/t/using-the-stack-on-lsst-dev/221>\
**Category:** Data Management\
**Tags:** dm-dev\
**Created:** [September 12, 2015, 3:06am UTC](https://www.rubin.community/t/using-the-stack-on-lsst-dev/221 "2015-09-12T03:06:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![swinbank](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/swinbank/32/24_2.png) [@swinbank](https://www.rubin.community/u/swinbank)\
**Post date:** [September 12, 2015, 3:06am UTC](https://www.rubin.community/t/using-the-stack-on-lsst-dev/221/1 "2015-09-12T03:06:19Z")

</div>

‼ **Warning**

The material below has largely been rendered obsolete by e.g. [DM-5021](https://jira.lsstcorp.org/browse/DM-5021). It is preserved here for posterity, but please refer to [DM-5435](https://jira.lsstcorp.org/browse/DM-5435) and [this topic](http://www.rubin.community/t/shared-stack-on-lsst-development-machines/641) for details on a replacement, and, in general, refer to the [Developer Guide](http://developer.lsst.io/en/latest/) for the most current information.

* * *

Many of us use `lsst-dev` as a convenient machine for developing, or, at least, for occasional testing. However, I, for one, can never remember what the best way to get hold of a recent version of the stack on that machine is; I’m guessing others, and particularly newcomers, have similar problems. Here’s my attempt to record the situation for posterity: others who know better please do correct me.

#### The Buildbot stack

Everything that Buildbot builds gets installed into `~lsstsw/stack`. You can access this stack by running:

```
$ . ~lsstsw/bin/setup.sh

```

You can choose a buildbot tag (look at the log – [for example this one](http://lsst-buildx.ncsa.illinois.edu:8010/builders/DM_stack/builds/8975/steps/shell/logs/stdio) – and find a line like `#BUILD ID: bNNNN`) then run:

```
$ setup -t bNNNN lsst_apps # or whatever product you prefer

```

However, the current version of eups doesn’t scale well to extremely large numbers of tags, so this gets _really_ slow. A better option might be:

#### The shared, copied stack

Selected tags generated by Buildbot are copied to a shared stack in `/lsst/stack`. Access it like so:

```
$ source /lsst/stack/loadLSST.sh

```

See [this mail to dm-devel](https://lists.lsst.org/mailman/private/dm-devel/2015-July/000765.html) for further details, including how to add new tags via the `copyTag.sh` script.

However, as this stack accumulates more tags, it also slows down. Unfortunately, there’s no easy way to prune the old tags. Instead, you could consider:

#### A personal, copied stack

The `copyTag.sh` script described above can be used to copy tags from the Buildbot stack into your own personal stack. An easy way to bootstrap a stack is to run `newinstall.sh` – see [these instructions](http://dm.lsst.org/#code). For example, the following should work:

```
$ mkdir /raid/${username}/stack
$ cd /raid/${username}/stack
$ curl -O https://sw.lsstcorp.org/eupspkg/newinstall.sh
$ bash newinstall.sh
(Select options to:
    1. Continue without installing git;
    2. Install Anaconda)
$ . loadLSST.bash
$ /lsst/stack/copyTag.sh bNNNN
$ setup -t bNNNN lsst_apps # or whatever product you prefer

```

This way, you have complete control of the tags available in your personal stack. When it gets too overcrowded and slow, simply delete it and create a new one.

---

<div class="post-metadata">

**Author:** ![jbosch](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/jbosch/32/12_2.png) [@jbosch](https://www.rubin.community/u/jbosch)\
**Post date:** [September 18, 2015, 6:19pm UTC](https://www.rubin.community/t/using-the-stack-on-lsst-dev/221/2 "2015-09-18T18:19:52Z")

</div>

The linked email doesn’t actually describe how to use `copyTag.sh` (is it just “`copyTag.sh <tag-name>`”?), and it’s a pain to access the list archives. Could @ktl perhaps repeat that information here?

---

<div class="post-metadata">

**Author:** ![swinbank](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/swinbank/32/24_2.png) [@swinbank](https://www.rubin.community/u/swinbank)\
**Post date:** [September 18, 2015, 6:24pm UTC](https://www.rubin.community/t/using-the-stack-on-lsst-dev/221/3 "2015-09-18T18:24:06Z")

</div>

The third part of the post above does give an example:

```
$ /lsst/stack/copyTag.sh bNNNN

```

But yes, that could have been clearer.

---

<div class="post-metadata">

**Author:** ![ktl](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/ktl/32/1373_2.png) [@ktl](https://www.rubin.community/u/ktl)\
**Post date:** [September 18, 2015, 6:28pm UTC](https://www.rubin.community/t/using-the-stack-on-lsst-dev/221/4 "2015-09-18T18:28:31Z")

</div>

The script has a (minimal) “usage” line that says:

```auto
Usage: copyTag.sh [-n] [-e] <eups-tag>

-n shows what will be done
-e allows redeclaration of existing tag

```

It copies from the buildbot stack into whatever is the first stack in your `EUPS_PATH`.

---

<div class="post-metadata">

**Author:** ![jbosch](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/jbosch/32/12_2.png) [@jbosch](https://www.rubin.community/u/jbosch)\
**Post date:** [October 2, 2015, 3:48pm UTC](https://www.rubin.community/t/using-the-stack-on-lsst-dev/221/5 "2015-10-02T15:48:23Z")

</div>

Something is wrong here (not sure if it’s new); `/lsst/stack.sh` does not exist.

---

<div class="post-metadata">

**Author:** ![swinbank](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/swinbank/32/24_2.png) [@swinbank](https://www.rubin.community/u/swinbank)\
**Post date:** [October 2, 2015, 4:00pm UTC](https://www.rubin.community/t/using-the-stack-on-lsst-dev/221/6 "2015-10-02T16:00:57Z")

</div>

Should be `/lsst/stack/loadLSST.sh`. Will fix.

---

<div class="post-metadata">

**Author:** ![mwv](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mwv](https://www.rubin.community/u/mwv)\
**Post date:** [December 17, 2015, 10:39pm UTC](https://www.rubin.community/t/using-the-stack-on-lsst-dev/221/7 "2015-12-17T22:39:20Z")

</div>

lsst-dev refers to the machine installed at NCSA  
[lsst-dev.ncsa.illinois.edu](http://lsst-dev.ncsa.illinois.edu)

I add to help searching find this page.

---

<div class="post-metadata">

**Author:** ![swinbank](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/swinbank/32/24_2.png) [@swinbank](https://www.rubin.community/u/swinbank)\
**Post date:** [February 3, 2016, 8:40pm UTC](https://www.rubin.community/t/using-the-stack-on-lsst-dev/221/8 "2016-02-03T20:40:48Z")

</div>

Be warned that [DM-5021](https://jira.lsstcorp.org/browse/DM-5021) has currently rendered the `/lsst/stack` stack unusable.
