Browse Source

Trying to make docker image build + run OK out of the box

scan_duration
haavee 1 year ago
parent
commit
1b70fd5f41
  1. 3
      CMakeLists.txt
  2. 2
      apps/j2ms2/CMakeLists.txt
  3. 2
      apps/tConvert/CMakeLists.txt
  4. 9
      containers/Dockerfile

3
CMakeLists.txt

@ -22,6 +22,9 @@ option(BUILD_SHARED_LIBS "Build shared library" ON)
# RPATH handling - for 3rd party dependencies we want to retain
# the link path in the RPATH thank you very much
# Following https://stackoverflow.com/a/30400628
# "CMAKE RPATH not working - could not find shared object file"
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# We require CASACORE, VEX

2
apps/j2ms2/CMakeLists.txt

@ -1,4 +1,4 @@
# How to make j2ms2
# How to make j4ms2
add_executable(j2ms2 j2ms2.cc)

2
apps/tConvert/CMakeLists.txt

@ -4,6 +4,6 @@
add_executable(tConvert tConvert.cc)
# Set the libraries this target depends on
target_link_libraries(tConvert PUBLIC Utilities labels ms2uvfitsimpl j2ms casacore)
target_link_libraries(tConvert PUBLIC ms2uvfitsimpl Utilities labels j2ms casacore)
# and where this target should end up after installation
install(TARGETS tConvert DESTINATION bin)

9
containers/Dockerfile

@ -15,14 +15,13 @@ RUN docker-apt-install -y --fix-missing --no-install-recommends \
libatlas-base-dev libhdf5-dev libblas-dev libbsd-dev libcfitsio-dev liblapack-dev \
libncurses5-dev libreadline-dev tcl wcslib-dev ca-certificates \
casacore-dev casacore-tools casacore-data
# gitea.jive.eu does not have a good certificate yet
RUN git config --global http.sslverify false
# we require the VEX parser
RUN cd /usr/local/src && git clone https://gitea.jive.eu/verkout/myvex.git
RUN cd /usr/local/src && git clone https://code.jive.eu/verkout/myvex.git
RUN mkdir -p /tmp/build-mv && cd /tmp/build-mv && cmake /usr/local/src/myvex && make install
# now we can clone + build the C++ casacore dependent tooling
RUN cd /usr/local/src && git clone https://gitea.jive.eu/verkout/jive-casa.git
RUN cd /usr/local/src && git clone https://code.jive.eu/verkout/jive-casa.git
RUN mkdir -p /tmp/build-jc && cd /tmp/build-jc && cmake -DCASACORE_ROOT_DIR=/usr/local -DVEX_ROOT_DIR=/usr/local -DCMAKE_INSTALL_PREFIX=/usr/local /usr/local/src/jive-casa && make -j 4 install
# This is just a base image
ENTRYPOINT ["/bin/echo", "Use /usr/local/bin/{j2ms2,tConvert}"]
#["/bin/echo", "Use /usr/local/bin/{j2ms2,tConvert}"]
ENTRYPOINT "/bin/bash"

Loading…
Cancel
Save