-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Devops/docker envs #271
Merged
Merged
Devops/docker envs #271
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c6ff1e2
Updating Release notes for patch; Editing Release versions.
mdavis36 35d1365
Merge branch 'develop' into rc-v2024.01.1
mdavis36 ffd0e97
Merge pull request #263 from LLNL/rc-v2024.01.1
mdavis36 c0697c6
Moving Spheral python install into lib/pythonX.Y/site-packages dir.
mdavis36 ede7a75
Adding documentation on how to use Docker Dev environments.
mdavis36 4c1d65f
Using to determine OS when SYS_TYPE is not available. Changing x86_6…
mdavis36 c6ae5c3
Adding documentation on editing packages.yaml files for external users.
mdavis36 c6cd329
Adding generic config dir.
mdavis36 a608bb9
Guarding python file install for CXXONLY builds.
mdavis36 e444144
Command fixes for using docker env for developing Spheral.
mdavis36 b5a3958
Merge tag 'v2024.01.1' into devops/docker-envs
mdavis36 7ddd2f9
Release notes; Adding --fail-fast option to spack install.
mdavis36 93fa90e
Split spack install into separate commands, one for tpls and one for …
mdavis36 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
set(SPHERAL_VERSION 2024.01.0) | ||
set(SPHERAL_VERSION 2024.01.1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.. _required system packages: | ||
|
||
Required System Packages | ||
######################## | ||
|
||
This guide assumes the use of an Ubuntu 20.04 system using ``apt`` as the package manager. For other other operating systems please install the corresponding packages as seen below. | ||
|
||
:: | ||
|
||
sudo apt update | ||
sudo apt upgrade | ||
sudo apt install build-essential git gfortran mpich autotools-dev autoconf sqlite pkg-config uuid gettext cmake libncurses-dev libgdbm-dev libffi-dev libssl-dev libexpat-dev libreadline-dev liblapack-dev libbz2-dev locales python python3 unzip libtool wget curl tk-dev |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
******************************************* | ||
Docker Development Environment | ||
******************************************* | ||
|
||
Spheral builds an up-to-date docker container for every merge-request | ||
on ``develop``. Developers can use this container to do development tasks | ||
on local machines. | ||
|
||
=========================== | ||
Creating a Dev Environment | ||
=========================== | ||
|
||
We will use ``docker dev create`` with our spheral docker image and a | ||
local repository. This will allow us to skip setting up a linux system with | ||
external packages, gives us pre-built TPLs and allows us to edit a cloned | ||
repository from our local machines IDE/text editor.bash:: | ||
|
||
> rm <path_to_local_repo>/compose-dev.yaml | ||
> docker dev create --base-image ghcr.io/llnl/spheral --name <name_your_env> --path <path_to_local_repo> -o <path_to_local_repo> | ||
|
||
.. note:: | ||
You need to have **Docker Desktop**, **VSCode** and the **VSCode Dev Environment Extension** installed for this to work. You do not need to use VSCode to access the container, but the extension seems to do some of the lifting for us when setting up the volume to our local repo. | ||
|
||
**Output** :: | ||
|
||
spheral-recursing_darwin <---- Name of dev environment | ||
Creating Dev Environment "spheral-recursing_darwin" | ||
populating volume from /Users/davis291/Projects/spheral | ||
Creating Dev Environment "spheral-recursing_darwin" | ||
detecting language | ||
Detecting main repo language... | ||
building compose stack | ||
building compose stack | ||
starting compose stack | ||
starting compose stack | ||
Network spheral-recursing_darwin_default Creating | ||
Network spheral-recursing_darwin_default Created | ||
Container spheral-recursing_darwin-app-1 Creating | ||
Container spheral-recursing_darwin-app-1 Created | ||
Container spheral-recursing_darwin-app-1 Starting | ||
Container spheral-recursing_darwin-app-1 Started <---- Name of running container to connect to. | ||
Dev Environment "spheral-recursing_darwin" (5bd37219d27eb68a77ce6fd8fee05a533a52017d8dcc72430867e2471e428e58) is running!% | ||
|
||
|
||
============================= | ||
Connecting to a Dev Container | ||
============================= | ||
|
||
Once the continaer has ben started you can connect directly through the terminal | ||
with the **Container** name (**NOT** the **Dev Environment** name).:: | ||
|
||
> docker exec -it spheral-recursing_darwin-app-1 /bin/bash | ||
root@671dab5d0b00:/home/spheral/workspace/build_docker-gcc/install# | ||
|
||
This drops you into the install location of the ``spheral@develop`` build from | ||
github, this is a fully installed version of the latest ``develop`` spheral. | ||
|
||
.. tip:: | ||
VSCode & Docker Desktop: | ||
* Open **Docker Desktop** and navigate to the **Dev Environment** tab. | ||
* Find the container name and select **OPEN IN VSCODE**. | ||
|
||
|
||
============================= | ||
Development Work | ||
============================= | ||
|
||
Your local Spheral repo is mounted from your local filesystem. You can develop directly from your | ||
IDE or text editor of choice. Then you can compile and run from within the container itself. | ||
|
||
- The local Spheral repository will be mounted in the container at ``/com.docker.devenvironments.code/``. | ||
|
||
- There already exists a full build and install of Spheral at ``develop`` in ``/home/spheral/workspace/build_docker-gcc/install``. | ||
|
||
- An updated host config file can be found at ``/home/spheral/wokspace/docker-gcc.cmake``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# ------------------------------------------------------------------------- | ||
# This is the default spack configuration file. | ||
# | ||
# Settings here are versioned with Spack and are intended to provide | ||
# sensible defaults out of the box. Spack maintainers should edit this | ||
# file to keep it current. | ||
# | ||
# Users can override these settings by editing | ||
# `$SPACK_ROOT/etc/spack/concretizer.yaml`, `~/.spack/concretizer.yaml`, | ||
# or by adding a `concretizer:` section to an environment. | ||
# ------------------------------------------------------------------------- | ||
concretizer: | ||
# Whether to consider installed packages or packages from buildcaches when | ||
# concretizing specs. If `true`, we'll try to use as many installs/binaries | ||
# as possible, rather than building. If `false`, we'll always give you a fresh | ||
# concretization. | ||
reuse: true | ||
# Options that tune which targets are considered for concretization. The | ||
# concretization process is very sensitive to the number targets, and the time | ||
# needed to reach a solution increases noticeably with the number of targets | ||
# considered. | ||
targets: | ||
# Determine whether we want to target specific or generic microarchitectures. | ||
# An example of the first kind might be for instance "skylake" or "bulldozer", | ||
# while generic microarchitectures are for instance "aarch64" or "x86_64_v4". | ||
granularity: generic | ||
# If "false" allow targets that are incompatible with the current host (for | ||
# instance concretize with target "icelake" while running on "haswell"). | ||
# If "true" only allow targets that are compatible with the host. | ||
host_compatible: true | ||
# When "true" concretize root specs of environments together, so that each unique | ||
# package in an environment corresponds to one concrete spec. This ensures | ||
# environments can always be activated. When "false" perform concretization separately | ||
# on each root spec, allowing different versions and variants of the same package in | ||
# an environment. | ||
unify: true |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why wasn't this install call needed before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dev-build
acts the same asinstall
in regards to concretizing and installing dependencies, butdev-build
doesn't have the--fail-fast
option. So here we have spack install only the dependencies withinstall
, then let it create thehost-config
file fromdev-build
with our local repo. Usinginstall
tries to pull spheral develop and that isn't what we want for tpl-manager