Add docker image#331
Merged
Merged
Conversation
Collaborator
Author
|
Before the first image is publicly available, you'll need to build locally. If you have docker installed, you can do this using Then, you should be able to execute the commands in the README |
Collaborator
|
Amazing, thanks @tbody-cfs ! |
tbody-cfs
commented
Apr 23, 2025
Comment on lines
194
to
215
| # Once built, copy the data and test directories | ||
| add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | ||
| COMMAND ${CMAKE_COMMAND} -E copy_directory | ||
| ${CMAKE_SOURCE_DIR}/examples $<TARGET_FILE_DIR:${PROJECT_NAME}>/examples) | ||
| option(HERMES_COPY_EXAMPLES_TO_BUILD "Copy the examples to the build directory" ON) | ||
| if(HERMES_COPY_EXAMPLES_TO_BUILD) | ||
| add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | ||
| COMMAND ${CMAKE_COMMAND} -E copy_directory | ||
| ${CMAKE_SOURCE_DIR}/examples $<TARGET_FILE_DIR:${PROJECT_NAME}>/examples) | ||
| endif() | ||
|
|
||
| add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | ||
| COMMAND ${CMAKE_COMMAND} -E copy_directory | ||
| ${CMAKE_SOURCE_DIR}/json_database $<TARGET_FILE_DIR:${PROJECT_NAME}>/json_database) | ||
| option(HERMES_COPY_JSON_DATABASE_TO_BUILD "Copy the json database to the build directory" ON) | ||
| if(HERMES_COPY_JSON_DATABASE_TO_BUILD) | ||
| add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | ||
| COMMAND ${CMAKE_COMMAND} -E copy_directory | ||
| ${CMAKE_SOURCE_DIR}/json_database $<TARGET_FILE_DIR:${PROJECT_NAME}>/json_database) | ||
| endif() | ||
|
|
||
| add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | ||
| COMMAND ${CMAKE_COMMAND} -E copy_directory | ||
| ${CMAKE_SOURCE_DIR}/tests $<TARGET_FILE_DIR:${PROJECT_NAME}>/tests) | ||
| option(HERMES_COPY_TESTS_TO_BUILD "Copy the tests to the build directory" ON) | ||
| if(HERMES_COPY_TESTS_TO_BUILD) | ||
| add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | ||
| COMMAND ${CMAKE_COMMAND} -E copy_directory | ||
| ${CMAKE_SOURCE_DIR}/tests $<TARGET_FILE_DIR:${PROJECT_NAME}>/tests) | ||
| endif() | ||
|
|
Collaborator
Author
There was a problem hiding this comment.
Needed to add these extra options to reduce the docker image size.
tbody-cfs
commented
Apr 23, 2025
Comment on lines
+3
to
+10
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -51,7 +51,7 @@ message(STATUS "Configuring BOUT++ version ${BOUT_FULL_VERSION}") | ||
| project(BOUT++ | ||
| DESCRIPTION "Fluid PDE solver framework" | ||
| VERSION ${BOUT_CMAKE_ACCEPTABLE_VERSION} | ||
| - LANGUAGES CXX) | ||
| + LANGUAGES C CXX) |
Collaborator
Author
There was a problem hiding this comment.
Alternatively, we could use a BOUT version with boutproject/BOUT-dev#3101
Collaborator
Author
|
Ready for merge |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
See #329
This PR adds a docker image build recipe, and pushes images to Github's container registry for releases.
There is a README in the
dockerfolder explaining how to use the image.If you'd rather not have the extra complexity to manage, no need to merge. I was fixing some broken dependencies so sharing if it's useful.
@bendudson @mikekryjak