Skip to content

Commit

Permalink
consolidated the dockerfile build of sliderule into using the slideru…
Browse files Browse the repository at this point in the history
…leearth-aws makefile
  • Loading branch information
jpswinski committed Nov 13, 2023
1 parent ea412a4 commit 3c99860
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 82 deletions.
7 changes: 4 additions & 3 deletions targets/slideruleearth-aws/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ PROXY_STAGE_DIR = $(STAGE)/proxy
TF_STAGE_DIR = $(STAGE)/tf
STATIC_WEB_SOURCE_DIR = $(ROOT)/docs
STATIC_WEB_STAGE_DIR = $(STAGE)/website
INSTALL_DIR ?= $(SERVER_STAGE_DIR)

VERSION ?= latest
VERSION_TOKENS := $(subst ., ,$(lastword $(VERSION)))
Expand All @@ -79,7 +80,7 @@ CLANG_OPT = -DCMAKE_USER_MAKE_RULES_OVERRIDE=$(ROOT)/platforms/linux/ClangOverri
CLANG_CFG = export CC=clang$(CLANG_VER) && export CXX=clang++$(CLANG_VER)

DEBUG_CFG := -DCMAKE_BUILD_TYPE=Debug
DEBUG_CFG += -DINSTALLDIR=$(SERVER_STAGE_DIR)
DEBUG_CFG += -DINSTALLDIR=$(INSTALL_DIR)
DEBUG_CFG += -DCMAKE_USER_MAKE_RULES_OVERRIDE=$(ROOT)/platforms/linux/ClangOverrides.txt -D_CMAKE_TOOLCHAIN_PREFIX=llvm-
DEBUG_CFG += -DENABLE_ADDRESS_SANITIZER=ON
DEBUG_CFG += -DUSE_ARROW_PACKAGE=ON
Expand All @@ -93,7 +94,7 @@ DEBUG_CFG += -DUSE_PISTACHE_PACKAGE=ON
DEBUG_CFG += $(USERCFG)

RELEASE_CFG := -DCMAKE_BUILD_TYPE=Release
RELEASE_CFG += -DINSTALLDIR=$(SERVER_STAGE_DIR)
RELEASE_CFG += -DINSTALLDIR=$(INSTALL_DIR)
RELEASE_CFG += -DUSE_ARROW_PACKAGE=ON
RELEASE_CFG += -DUSE_AWS_PACKAGE=ON
RELEASE_CFG += -DUSE_GEO_PACKAGE=ON
Expand Down Expand Up @@ -164,7 +165,7 @@ sliderule: ## build the server using the local configuration
make -C $(SWOT_BUILD_DIR) install

run: ## run the server locally
IPV4=$(MYIP) ENVIRONMENT_VERSION=$(ENVVER) $(SERVER_STAGE_DIR)/bin/sliderule $(ROOT)/scripts/apps/server.lua config.json
IPV4=$(MYIP) ENVIRONMENT_VERSION=$(ENVVER) $(INSTALL_DIR)/bin/sliderule $(ROOT)/scripts/apps/server.lua config.json

run-buildenv: ## run the build environment docker container
docker run -it -v $(ROOT):/host --rm --name buildenv $(ECR)/sliderule-buildenv:$(VERSION)
Expand Down
82 changes: 3 additions & 79 deletions targets/slideruleearth-aws/docker/sliderule/Dockerfile.runtime
Original file line number Diff line number Diff line change
Expand Up @@ -4,85 +4,9 @@ FROM $repo/sliderule-buildenv:latest AS buildenv
# copy sliderule source repository
COPY sliderule /sliderule

# build and install sliderule into staging
RUN mkdir -p /build/sliderule
WORKDIR /build/sliderule
RUN cmake -DCMAKE_BUILD_TYPE=Release \
-DMAX_FREE_STACK_SIZE=1 \
-DUSE_ARROW_PACKAGE=ON \
-DUSE_AWS_PACKAGE=ON \
-DUSE_H5_PACKAGE=ON \
-DUSE_NETSVC_PACKAGE=ON \
-DUSE_GEO_PACKAGE=ON \
-DUSE_LEGACY_PACKAGE=OFF \
-DUSE_CCSDS_PACKAGE=OFF \
/sliderule
RUN make -j8
RUN make install

# build and install target configuration into staging
RUN mkdir -p /build/target
WORKDIR /build/target
RUN cmake -DCMAKE_BUILD_TYPE=Release \
/sliderule/targets/slideruleearth-aws
RUN make -j8
RUN make install

# build and install gedi plugin into staging
RUN mkdir -p /build/gedi
WORKDIR /build/gedi
RUN cmake -DCMAKE_BUILD_TYPE=Release \
/sliderule/plugins/gedi
RUN make -j8
RUN make install

# build and install icesat2 plugin into staging
RUN mkdir -p /build/icesat2
WORKDIR /build/icesat2
RUN cmake -DCMAKE_BUILD_TYPE=Release \
/sliderule/plugins/icesat2
RUN make -j8
RUN make install

# build and install landsat plugin into staging
RUN mkdir -p /build/landsat
WORKDIR /build/landsat
RUN cmake -DCMAKE_BUILD_TYPE=Release \
/sliderule/plugins/landsat
RUN make -j8
RUN make install

# build and install opendata plugin into staging
RUN mkdir -p /build/opendata
WORKDIR /build/opendata
RUN cmake -DCMAKE_BUILD_TYPE=Release \
/sliderule/plugins/opendata
RUN make -j8
RUN make install

# build and install pgc plugin into staging
RUN mkdir -p /build/pgc
WORKDIR /build/pgc
RUN cmake -DCMAKE_BUILD_TYPE=Release \
/sliderule/plugins/pgc
RUN make -j8
RUN make install

# build and install swot plugin into staging
RUN mkdir -p /build/swot
WORKDIR /build/swot
RUN cmake -DCMAKE_BUILD_TYPE=Release \
/sliderule/plugins/swot
RUN make -j8
RUN make install

# build and install usgs3dep plugin into staging
RUN mkdir -p /build/usgs3dep
WORKDIR /build/usgs3dep
RUN cmake -DCMAKE_BUILD_TYPE=Release \
/sliderule/plugins/usgs3dep
RUN make -j8
RUN make install
# build and install sliderule application
WORKDIR /sliderule/targets/slideruleearth-aws
RUN make config-release INSTALL_DIR=/usr/local && make

# install project specific files
COPY etc/* /usr/local/etc/sliderule/
Expand Down

0 comments on commit 3c99860

Please sign in to comment.