Skip to content

Commit

Permalink
Add logic check to check for presence of env var before activating se…
Browse files Browse the repository at this point in the history
…rvice account (#358)
  • Loading branch information
deadlycoconuts authored Aug 16, 2023
1 parent 1b55562 commit 78ca7b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion engines/pyfunc-ensembler-job/app.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ FROM ${BASE_IMAGE}

ARG MODEL_URL
ARG GOOGLE_APPLICATION_CREDENTIALS
RUN gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}
# Run docker build using the credentials if provided
RUN if [[-z "$GOOGLE_APPLICATION_CREDENTIALS"]]; then gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}; fi
RUN gsutil -m cp -r ${MODEL_URL} .
ARG FOLDER_NAME
RUN /bin/bash -c ". activate ${CONDA_ENVIRONMENT} && conda env update --name ${CONDA_ENVIRONMENT} --file /${HOME}/${FOLDER_NAME}/conda.yaml"
3 changes: 2 additions & 1 deletion engines/pyfunc-ensembler-service/app.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ ARG MODEL_URL
ARG FOLDER_NAME
ARG GOOGLE_APPLICATION_CREDENTIALS

RUN gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}
# Run docker build using the credentials if provided
RUN if [[-z "$GOOGLE_APPLICATION_CREDENTIALS"]]; then gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}; fi
RUN gsutil -m cp -r ${MODEL_URL} .

# Install dependencies required by the user-defined ensembler
Expand Down

0 comments on commit 78ca7b3

Please sign in to comment.