-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update Dockerfile #154
Open
mdpiper
wants to merge
14
commits into
eWaterCycle:main
Choose a base branch
from
csdms:update-dockerfile
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Update Dockerfile #154
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
54a4cea
Use latest Ubuntu LTS release
mdpiper f62b529
Replace old MAINTAINER with LABEL entries
mdpiper e7e6a56
Combine apt-get update and install in one layer
mdpiper b87fda4
Sort multiline arguments
mdpiper e6cc9fa
Clear apt cache for smaller image size
mdpiper 1866fc2
Build latest tagged version of gRPC (1.66.1)
mdpiper 3f55f44
Fix mistake in version name
mdpiper f9c8a03
Install ssl package
mdpiper b0be2bc
Clean gRPC build artifacts
mdpiper 3d135af
Build BMI C and C++ specs from CSDMS source
mdpiper f092c37
Build grpc4bmi from current branch, for now
mdpiper ba8f03c
Add back call to ldconfig
mdpiper a78ccc6
Use C++ 17 to build grpc and grpc4bmi
mdpiper c97c30e
Locate and build against the absl_check library
mdpiper 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,67 @@ | ||
# DockerFile for grpc4bmi. Installs the C++ bindings in the /usr/local prefix directory in the container. If you are | ||
# planning to run a container with your BMI-enabled model and communicate with it using grpc4bmi, you can use this as a | ||
# base image for your model | ||
FROM ubuntu:bionic | ||
MAINTAINER Gijs van den Oord <[email protected]> | ||
RUN apt-get update | ||
FROM ubuntu:24.04 | ||
LABEL author="Gijs van den Oord" | ||
LABEL email="[email protected]" | ||
|
||
ENV GRPC_VERSION="1.66.1" | ||
ENV BMIC_VERSION="2.1.2" | ||
ENV BMICXX_VERSION="2.0.2" | ||
|
||
# Prerequisite packages | ||
RUN apt-get install -y wget git build-essential g++ make cmake curl automake libtool pkg-config gfortran | ||
RUN apt-get update && apt-get install -y \ | ||
automake \ | ||
build-essential \ | ||
cmake \ | ||
curl \ | ||
g++ \ | ||
gfortran \ | ||
git \ | ||
libtool \ | ||
libssl-dev \ | ||
make \ | ||
pkg-config \ | ||
wget \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Build grpc from source | ||
RUN git clone -b $(curl -L https://grpc.io/release) --depth=1 https://github.com/grpc/grpc /opt/grpc | ||
RUN git clone -b v${GRPC_VERSION} --depth 1 https://github.com/grpc/grpc /opt/grpc | ||
WORKDIR /opt/grpc | ||
RUN git submodule update --init --recursive | ||
RUN make install | ||
WORKDIR third_party/protobuf | ||
RUN make install | ||
WORKDIR /opt/grpc/cmake/_build | ||
RUN cmake ../.. \ | ||
-DgRPC_INSTALL=ON \ | ||
-DgRPC_SSL_PROVIDER=package \ | ||
-DgRPC_BUILD_TESTS=OFF \ | ||
-DCMAKE_CXX_STANDARD=17 \ | ||
-DBUILD_SHARED_LIBS=ON && \ | ||
make install && \ | ||
make clean | ||
|
||
# Build bmi-c from source | ||
RUN git clone --depth=1 https://github.com/eWaterCycle/grpc4bmi.git /opt/grpc4bmi | ||
WORKDIR /opt/grpc4bmi | ||
RUN git submodule update --init --recursive | ||
RUN mkdir -p /opt/grpc4bmi/cpp/bmi-c/build | ||
WORKDIR /opt/grpc4bmi/cpp/bmi-c/build | ||
RUN cmake .. | ||
RUN make install | ||
# Build bmi-c and bmi-cxx from source | ||
RUN git clone --branch v${BMIC_VERSION} https://github.com/csdms/bmi-c /opt/bmi-c | ||
WORKDIR /opt/bmi-c/_build | ||
RUN cmake .. && \ | ||
make install && \ | ||
make clean | ||
RUN git clone --branch v${BMICXX_VERSION} https://github.com/csdms/bmi-cxx /opt/bmi-cxx | ||
WORKDIR /opt/bmi-cxx/_build | ||
RUN cmake .. && \ | ||
make install && \ | ||
make clean | ||
|
||
RUN ldconfig | ||
|
||
# Build grpc4bmi from source | ||
RUN mkdir -p /opt/grpc4bmi/cpp/build | ||
WORKDIR /opt/grpc4bmi/cpp/build | ||
RUN cmake .. | ||
RUN make install | ||
RUN git clone --branch update-dockerfile --depth 1 https://github.com/csdms/grpc4bmi /opt/grpc4bmi | ||
WORKDIR /opt/grpc4bmi | ||
RUN git submodule update --init | ||
WORKDIR /opt/grpc4bmi/cpp/_build | ||
RUN cmake .. -DCMAKE_CXX_STANDARD=17 && \ | ||
make && \ | ||
ctest && \ | ||
make install && \ | ||
make clean | ||
|
||
WORKDIR /opt |
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
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.
A note: if this PR is approved, the grpc4bmi remote needs to be switched from
csdms
back toeWaterCycle
, and the build branch fromupdate-dockerfile
tomain
.