# Utilising spack in a shared environment

**URL:** <https://forum.access-hive.org.au/t/utilising-spack-in-a-shared-environment/377>\
**Category:** spack\
**Tags:** spack, azure\
**Created:** [27 January 2023 01:33 UTC](https://forum.access-hive.org.au/t/utilising-spack-in-a-shared-environment/377 "2023-01-27T01:33:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aidan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/aidan/32/42_2.png) [@Aidan](https://forum.access-hive.org.au/u/Aidan)\
**Post date:** [27 January 2023 01:33 UTC](https://forum.access-hive.org.au/t/utilising-spack-in-a-shared-environment/377/1 "2023-01-27T01:33:06Z")

</div>

spack has the ability to “chain” spack installs:

[https://spack.readthedocs.io/en/latest/chain.html](https://spack.readthedocs.io/en/latest/chain.html)

This is a way users can utilise a central spack install with many pre-built packages, but still be able to build their own software in their own spack directory.

This is a detailed write-up of how to do this in an Azure multi-user HPC environment:

> **[Welcome to the Microsoft Tech Community](https://techcommunity.microsoft.com/html/maint/index.html)**
>
> Your community for best practices and the latest news on Azure

---

<div class="post-metadata">

**Author:** ![harshula](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/harshula/32/256_2.png) [@harshula](https://forum.access-hive.org.au/u/harshula)\
**Post date:** [2 January 2024 05:18 UTC](https://forum.access-hive.org.au/t/utilising-spack-in-a-shared-environment/377/2 "2024-01-02T05:18:53Z")

</div>

Caveat:

> `install_tree` must point to the `opt/spack` directory inside of the Spack base directory.

Chaining may not be an appropriate solution if the `install_tree` points to a directory outside the Spack base directory.
