-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add docarray install instructions in dockerfile (#65)
* feat: add docarray install instructions in dockerfile * fix: cleaning * test: assert docarray version
- Loading branch information
Showing
18 changed files
with
207 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# executor_7 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
jtype: executor_7 | ||
metas: | ||
py_modules: | ||
- executor.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from jina import Executor, DocumentArray, requests | ||
|
||
|
||
class executor_7(Executor): | ||
@requests | ||
def foo(self, docs: DocumentArray, **kwargs): | ||
pass |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# executor_7 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
jtype: executor_7 | ||
metas: | ||
py_modules: | ||
- executor.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from jina import Executor, DocumentArray, requests | ||
|
||
|
||
class executor_7(Executor): | ||
@requests | ||
def foo(self, docs: DocumentArray, **kwargs): | ||
pass |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters