-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: add docarray install instructions in dockerfile #65
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM jinaai/jina:3.16.0 | ||
|
||
COPY . /workspace | ||
WORKDIR /workspace | ||
|
||
ENTRYPOINT ["jina", "executor", "--uses", "config.yml"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM jinaai/jina:3.16.0 | ||
|
||
COPY . /workspace | ||
WORKDIR /workspace | ||
|
||
RUN pip install --default-timeout=1000 --compile --no-cache-dir docarray==0.30.0 # generated | ||
ENTRYPOINT ["jina", "executor", "--uses", "config.yml"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# executor_7 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This file is automatically generated by Jina executor normalizer plugin. | ||
# It is not intended for manual editing. | ||
|
||
# ATTENTION: ARG before FROM will be invalid in the statements after FROM tag | ||
ARG ARG_BASE_IMAGE | ||
FROM ${ARG_BASE_IMAGE} | ||
|
||
ARG ARG_JINA_VERSION | ||
ARG ARG_PIP_JINA_VERSION | ||
ARG ARG_DOCARRAY_VERSION | ||
ARG ARG_BUILD_DATE | ||
# the following label use ARG hence will invalid the cache | ||
LABEL org.opencontainers.image.created=${ARG_BUILD_DATE} \ | ||
org.opencontainers.image.source="https://github.com/jina-ai/jina/commit/refs/tags/${ARG_JINA_VERSION}" \ | ||
org.opencontainers.image.version=${ARG_JINA_VERSION} \ | ||
org.opencontainers.image.revision=refs/tags/${ARG_JINA_VERSION} | ||
|
||
# the following env use ARG hence will invalid the cache | ||
ENV JINA_VERSION=${ARG_JINA_VERSION} \ | ||
JINA_VCS_VERSION=refs/tags/${ARG_JINA_VERSION} \ | ||
JINA_BUILD_DATE=${ARG_BUILD_DATE} | ||
|
||
# There is a history bug in Jina core. | ||
# Both JINA_PIP_INSTALL_CORE and JINA_PIP_INSTALL_PERF were set no matter in any cases | ||
# https://github.com/jina-ai/jina/pull/3673 | ||
RUN unset JINA_PIP_INSTALL_CORE && \ | ||
unset JINA_PIP_INSTALL_PERF | ||
|
||
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 \ | ||
pip uninstall -y docarray && pip install --upgrade docarray==${ARG_DOCARRAY_VERSION} ; \ | ||
fi | ||
ENTRYPOINT ["jina", "executor", "--uses", "config.yml"] |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,4 @@ | ||||||
jtype: executor_7 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
metas: | ||||||
py_modules: | ||||||
- executor.py |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,7 @@ | ||||||
from jina import Executor, DocumentArray, requests | ||||||
|
||||||
|
||||||
class executor_7(Executor): | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
@requests | ||||||
def foo(self, docs: DocumentArray, **kwargs): | ||||||
pass |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM jinaai/jina:3.16.0 | ||
|
||
COPY . /workspace | ||
WORKDIR /workspace | ||
|
||
ENTRYPOINT ["jina", "executor", "--uses", "config.yml"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This file is automatically generated by Jina executor normalizer plugin. | ||
# It is not intended for manual editing. | ||
|
||
# ATTENTION: ARG before FROM will be invalid in the statements after FROM tag | ||
ARG ARG_BASE_IMAGE | ||
FROM ${ARG_BASE_IMAGE} | ||
|
||
ARG ARG_JINA_VERSION | ||
ARG ARG_PIP_JINA_VERSION | ||
ARG ARG_DOCARRAY_VERSION | ||
ARG ARG_BUILD_DATE | ||
# the following label use ARG hence will invalid the cache | ||
LABEL org.opencontainers.image.created=${ARG_BUILD_DATE} \ | ||
org.opencontainers.image.source="https://github.com/jina-ai/jina/commit/refs/tags/${ARG_JINA_VERSION}" \ | ||
org.opencontainers.image.version=${ARG_JINA_VERSION} \ | ||
org.opencontainers.image.revision=refs/tags/${ARG_JINA_VERSION} | ||
|
||
# the following env use ARG hence will invalid the cache | ||
ENV JINA_VERSION=${ARG_JINA_VERSION} \ | ||
JINA_VCS_VERSION=refs/tags/${ARG_JINA_VERSION} \ | ||
JINA_BUILD_DATE=${ARG_BUILD_DATE} | ||
|
||
# There is a history bug in Jina core. | ||
# Both JINA_PIP_INSTALL_CORE and JINA_PIP_INSTALL_PERF were set no matter in any cases | ||
# https://github.com/jina-ai/jina/pull/3673 | ||
RUN unset JINA_PIP_INSTALL_CORE && \ | ||
unset JINA_PIP_INSTALL_PERF | ||
|
||
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 \ | ||
pip uninstall -y docarray && pip install --upgrade docarray==${ARG_DOCARRAY_VERSION} ; \ | ||
fi | ||
ENTRYPOINT ["jina", "executor", "--uses", "config.yml"] |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,2 @@ | ||||||
# executor_7 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This file is automatically generated by Jina executor normalizer plugin. | ||
# It is not intended for manual editing. | ||
|
||
# ATTENTION: ARG before FROM will be invalid in the statements after FROM tag | ||
ARG ARG_BASE_IMAGE | ||
FROM ${ARG_BASE_IMAGE} | ||
|
||
ARG ARG_JINA_VERSION | ||
ARG ARG_PIP_JINA_VERSION | ||
ARG ARG_DOCARRAY_VERSION | ||
ARG ARG_BUILD_DATE | ||
# the following label use ARG hence will invalid the cache | ||
LABEL org.opencontainers.image.created=${ARG_BUILD_DATE} \ | ||
org.opencontainers.image.source="https://github.com/jina-ai/jina/commit/refs/tags/${ARG_JINA_VERSION}" \ | ||
org.opencontainers.image.version=${ARG_JINA_VERSION} \ | ||
org.opencontainers.image.revision=refs/tags/${ARG_JINA_VERSION} | ||
|
||
# the following env use ARG hence will invalid the cache | ||
ENV JINA_VERSION=${ARG_JINA_VERSION} \ | ||
JINA_VCS_VERSION=refs/tags/${ARG_JINA_VERSION} \ | ||
JINA_BUILD_DATE=${ARG_BUILD_DATE} | ||
|
||
# There is a history bug in Jina core. | ||
# Both JINA_PIP_INSTALL_CORE and JINA_PIP_INSTALL_PERF were set no matter in any cases | ||
# https://github.com/jina-ai/jina/pull/3673 | ||
RUN unset JINA_PIP_INSTALL_CORE && \ | ||
unset JINA_PIP_INSTALL_PERF | ||
|
||
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 \ | ||
pip uninstall -y docarray && pip install --upgrade docarray==${ARG_DOCARRAY_VERSION} ; \ | ||
fi | ||
ENTRYPOINT ["jina", "executor", "--uses", "config.yml"] |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,4 @@ | ||||||
jtype: executor_7 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
metas: | ||||||
py_modules: | ||||||
- executor.py |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,7 @@ | ||||||
from jina import Executor, DocumentArray, requests | ||||||
|
||||||
|
||||||
class executor_7(Executor): | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
@requests | ||||||
def foo(self, docs: DocumentArray, **kwargs): | ||||||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.