Skip to content
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

fix: dont install if variable doesnt exist #66

Merged
merged 2 commits into from
May 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions normalizer/resources/templates/dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ ENV JINA_PIP_INSTALL_PERF=1
# Need to uninstall jina first when upgrading 2.x to 3.x
# https://github.com/jina-ai/jina/issues/4194
RUN pip uninstall -y jina && pip install --upgrade ${ARG_PIP_JINA_VERSION}
RUN if [ "$ARG_DOCARRAY_VERSION" != "undefined" ] ; then \
RUN if [ -n "$ARG_DOCARRAY_VERSION" ] && [ "$ARG_DOCARRAY_VERSION" != "undefined" ] ; then \
pip uninstall -y docarray && pip install --upgrade docarray==${ARG_DOCARRAY_VERSION} ; \
fi
fi
2 changes: 1 addition & 1 deletion tests/cases/executor_8/__jina__.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV JINA_PIP_INSTALL_PERF=1
# Need to uninstall jina first when upgrading 2.x to 3.x
# https://github.com/jina-ai/jina/issues/4194
RUN pip uninstall -y jina && pip install --upgrade ${ARG_PIP_JINA_VERSION}
RUN if [ "$ARG_DOCARRAY_VERSION" != "undefined" ] ; then \
RUN if [ -n "$ARG_DOCARRAY_VERSION" ] && [ "$ARG_DOCARRAY_VERSION" != "undefined" ] ; then \
pip uninstall -y docarray && pip install --upgrade docarray==${ARG_DOCARRAY_VERSION} ; \
fi
ENTRYPOINT ["jina", "executor", "--uses", "config.yml"]
2 changes: 1 addition & 1 deletion tests/cases/executor_9/Dockerfile.expect
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV JINA_PIP_INSTALL_PERF=1
# Need to uninstall jina first when upgrading 2.x to 3.x
# https://github.com/jina-ai/jina/issues/4194
RUN pip uninstall -y jina && pip install --upgrade ${ARG_PIP_JINA_VERSION}
RUN if [ "$ARG_DOCARRAY_VERSION" != "undefined" ] ; then \
RUN if [ -n "$ARG_DOCARRAY_VERSION" ] && [ "$ARG_DOCARRAY_VERSION" != "undefined" ] ; then \
pip uninstall -y docarray && pip install --upgrade docarray==${ARG_DOCARRAY_VERSION} ; \
fi
ENTRYPOINT ["jina", "executor", "--uses", "config.yml"]
2 changes: 1 addition & 1 deletion tests/cases/executor_9/__jina__.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV JINA_PIP_INSTALL_PERF=1
# Need to uninstall jina first when upgrading 2.x to 3.x
# https://github.com/jina-ai/jina/issues/4194
RUN pip uninstall -y jina && pip install --upgrade ${ARG_PIP_JINA_VERSION}
RUN if [ "$ARG_DOCARRAY_VERSION" != "undefined" ] ; then \
RUN if [ -n "$ARG_DOCARRAY_VERSION" ] && [ "$ARG_DOCARRAY_VERSION" != "undefined" ] ; then \
pip uninstall -y docarray && pip install --upgrade docarray==${ARG_DOCARRAY_VERSION} ; \
fi
ENTRYPOINT ["jina", "executor", "--uses", "config.yml"]