Skip to content

Commit

Permalink
swapped to using pre built dependencies for the gcs image
Browse files Browse the repository at this point in the history
  • Loading branch information
nedvedba committed Jan 2, 2024
1 parent 72b3997 commit cfc75b4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
16 changes: 13 additions & 3 deletions repository/gcs.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ ARG NVM_INC="$DATAFED_DIR/.nvm/versions/node/v13.14.0/include/node"
ARG NVM_BIN="$DATAFED_DIR/.nvm/versions/node/v13.14.0/bin"
ARG LIB_DIR="/usr/local/lib"

FROM ${DEPENDENCIES} AS dependencies

FROM ${GCS_IMAGE}

ARG DATAFED_DIR
Expand All @@ -22,8 +24,8 @@ RUN mkdir -p ${BUILD_DIR}/common/proto
RUN mkdir -p ${DATAFED_INSTALL_PATH}/authz
RUN mkdir -p ${DATAFED_DIR}/collections/mapped

RUN apt update
RUN apt install -y vim netcat
# RUN apt update
# RUN apt install -y vim netcat wget make

# For communicating with public
EXPOSE 443
Expand All @@ -40,8 +42,9 @@ RUN echo "#!/bin/bash\n\$@" > /usr/bin/sudo && chmod +x /usr/bin/sudo
COPY ./scripts/dependency_versions.sh ${BUILD_DIR}/scripts/
COPY ./scripts/dependency_install_functions.sh ${BUILD_DIR}/scripts/
COPY ./scripts/install_authz_dependencies.sh ${BUILD_DIR}/scripts/
COPY ./scripts/copy_dependency.sh ${BUILD_DIR}/scripts/

RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC ${BUILD_DIR}/scripts/install_authz_dependencies.sh
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC ${BUILD_DIR}/scripts/install_authz_dependencies.sh unify

ARG rebuild=true
ARG DATAFED_DIR
Expand Down Expand Up @@ -70,6 +73,13 @@ COPY --chown=datafed:root ./repository/docker/entrypoint_authz.sh ${BUILD_DIR}/r
COPY --chown=datafed:root ./common ${BUILD_DIR}/common
COPY --chown=datafed:root ./repository/gridftp/globus5 ${BUILD_DIR}/repository/gridftp/globus5

COPY --from=dependencies /libraries/libprotobuf.so /libraries/libprotobuf.so
COPY --from=dependencies /libraries/libzmq.so /libraries/libzmq.so
COPY --from=dependencies /libraries/libsodium.so /libraries/libsodium.so
RUN ${BUILD_DIR}/scripts/copy_dependency.sh protobuf to
RUN ${BUILD_DIR}/scripts/copy_dependency.sh libzmq to
RUN ${BUILD_DIR}/scripts/copy_dependency.sh libsodium to

RUN ${BUILD_DIR}/scripts/generate_datafed.sh

RUN ${BUILD_DIR}/scripts/generate_authz_config.sh && \
Expand Down
15 changes: 9 additions & 6 deletions scripts/install_authz_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,17 @@ if [ $# -eq 1 ]; then
esac
fi

if [[ $local_UNIFY = false ]]; then
sudo apt-get update
sudo dpkg --configure -a
sudo apt-get install -y "${packages[@]}"
sudo apt-get update
sudo dpkg --configure -a
sudo apt-get install -y "${packages[@]}"

cd ~
install_cmake

python3 -m pip install --upgrade pip
python3 -m pip install setuptools
python3 -m pip install --upgrade pip
python3 -m pip install setuptools

if [[ $local_UNIFY = false ]]; then
for ext in "${externals[@]}"; do
install_dep_by_name "$ext"
done
Expand Down

0 comments on commit cfc75b4

Please sign in to comment.