Configuration and documentation for building and running in Codespaces or Development Container #1101
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.
This adds the configuration necessary to build and run EGSnrc in a Development Container. I have
successfully tested this in the following environments:
Documentation:
.devcontainer/README.md
: A new README file has been added to explain how to use the development container. It provides instructions for different environments and addresses potential issues, such as line-endings in files when running locally on Windows. It also describes the runtime experience and provides reference information.Development container configuration:
.devcontainer/devcontainer.json
: This file contains the configuration for the development container. It specifies the Docker image to use, features to include, commands to run on creation and after creation, ports to forward, and attributes for the forwarded ports.Scripts for container setup and GUI applications build:
.devcontainer/setup.sh
: This script runs when the development container is being created. It installs the required packages for EGSnrc, builds the application, and configures.bashrc
with necessary environment variables and source commands..devcontainer/build-gui-apps.sh
: This script is used to build the GUI applications for EGSnrc. It checks if theEGS_HOME
environment variable is set and sources~/.bashrc
if not. It then builds the GUI applications.