You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorial_environments.rst
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ So far in this tutorial, we've covered the basic commands for managing individua
19
19
.. Customizing Spack's installation with configuration files, like
20
20
`packages.yaml <https://spack.readthedocs.io/en/latest/build_settings.html#build-settings>`_, was also discussed.
21
21
22
-
Now we'll explore Spack Environments -- a powerful feature that let's us manage collections of packages together in a documented and reproducible way.
22
+
Now we'll explore Spack Environments --- a powerful feature that let's us manage collections of packages together in a documented and reproducible way.
23
23
Spack environments are similar to *virtual environments* in other package managers (e.g., `Python venv <https://docs.python.org/3/library/venv.html>`_ or `nix-env <https://nix.dev/manual/nix/2.24/command-ref/nix-env>`_).
24
24
25
25
-------------------------------
@@ -54,7 +54,7 @@ This tutorial will teach you the fundamentals of creating and using Spack enviro
54
54
We'll cover:
55
55
1. Command line basics -- Creating and managing environments with Spack commands.
56
56
2. Configuration files -- Editing ``spack.yaml`` and understanding ``spack.lock``.
57
-
3. Environment types -- Understanding Spack-managed vs independent environments.
57
+
3. Environment types -- Understanding Spack-managed vs. independent environments.
58
58
4. Reproducible builds -- Sharing and recreating environments across systems.
59
59
60
60
-------------------
@@ -148,7 +148,7 @@ Let's try it:
148
148
:language: console
149
149
150
150
Now, ``tcl`` and ``trilinos`` have been registered as **root specs** in our environment. **Root specs** are packages that we've explicitly requested to be installed in an environment.
151
-
They're called **"roots"** because they sit at the top of the dependency graph—when Spack installs these packages, with their respective dependency packages sitting below them.
151
+
They're called **"roots"** because they sit at the top of the dependency graph---when Spack installs these packages, with their respective dependency packages sitting below them.
152
152
153
153
Now, let's install:
154
154
@@ -184,7 +184,7 @@ So, adding specs to an environment at a later point in time will not cause exist
184
184
185
185
Incrementally creating an environment may give us different package
186
186
versions from an environment created all at once.
187
-
We'll cover later in the tutorial this after we've discussed different
187
+
We'll cover this later in the tutorial after we've discussed different
188
188
concretization strategies.
189
189
190
190
Further, there are two other advantages of concretizing and installing an
@@ -216,7 +216,7 @@ This means that executables, libraries, and other files from your environment's
216
216
217
217
Let's explore how views work using the ``tcl`` package we just installed in our ``myproject`` environment. The Tcl package includes a shell-like application called ``tclsh``.
218
218
219
-
To can see the path to ``tclsh`` let's use the ``which`` command:
219
+
To see the path to ``tclsh`` let's use the ``which`` command:
@@ -238,7 +238,7 @@ Removing Packages from Environments
238
238
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
239
239
240
240
One of Spack's key features is that you can safely remove packages from specific environments without affecting other environments.
241
-
This works because Spack environments only create links to shared package installations—they don't contain the actual package files.
241
+
This works because Spack environments only create links to shared package installations---they don't contain the actual package files.
242
242
243
243
Let's demonstrate this capability by creating a second environment.
244
244
Imagine we have two projects:
@@ -291,7 +291,7 @@ We can see that ``myproject`` still has ``trilinos`` as a root spec.
291
291
The ``spack.yaml`` file
292
292
-----------------------
293
293
294
-
An environment is more than just a list of root specs -- it includes **configuration settings** that control how Spack behaves when the environment it activated.
294
+
An environment is more than just a list of root specs --- it includes **configuration settings** that control how Spack behaves when the environment it activated.
295
295
So far, ``myproject`` relies on configuration defaults, but these can be overridden to customize our environment's behavior.
296
296
297
297
In this section, we'll learn how to enforce that all the packages in our environment depending on ``mpi`` build with ``mpich`` by modifying our configuration.
@@ -313,7 +313,7 @@ There are several important parts of this file:
313
313
* ``concretizer:unify:`` Determines how package specs in the environment are
314
314
concretized together to reduce duplicated dependencies when possible.
315
315
316
-
The ``specs`` list should look familiar -- these are the package specs we've been modifying previously with ``spack add`` and ``spack install``.
316
+
The ``specs`` list should look familiar --- these are the package specs we've been modifying previously with ``spack add`` and ``spack install``.
317
317
318
318
The ``concretizer:unify:true`` setting controls how Spack resolves dependencies across packages specs in an environment:
319
319
@@ -322,7 +322,7 @@ The ``concretizer:unify:true`` setting controls how Spack resolves dependencies
322
322
* ``false``: specs are concretized *independently* from each other,
323
323
potentially allowing multiple versions of the package to appear in the
324
324
environment twice.
325
-
* ``when_possible``: A middle ground -- Spack attempts to unify dependencies
325
+
* ``when_possible``: A middle ground --- Spack attempts to unify dependencies
326
326
as possible but will backoff to allow duplicates when root specs require
0 commit comments