-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
63 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
FROM python:alpine as base | ||
|
||
RUN apk --no-cache add rustup \ | ||
&& rustup-init -yq --target nightly \ | ||
&& source "$HOME/.cargo/env" | ||
|
||
FROM base as tikv_client | ||
|
||
RUN apk --no-cache add \ | ||
git \ | ||
linux-headers \ | ||
gcc g++ \ | ||
cmake \ | ||
make \ | ||
clang14 \ | ||
openssl-dev \ | ||
openssl-libs-static \ | ||
protoc \ | ||
patchelf \ | ||
&& git clone https://github.com/tikv/client-py /root/client-py \ | ||
&& pip install maturin | ||
|
||
ENV CARGO_ENCODED_RUSTFLAGS="-L/usr/lib" \ | ||
OPENSSL_NO_VENDOR=1 | ||
|
||
WORKDIR /root/client-py | ||
RUN source "$HOME/.cargo/env" \ | ||
&& maturin build --release \ | ||
&& pip install target/wheels/*.whl | ||
|
||
FROM base as nucliadb | ||
|
||
RUN apk --no-cache add \ | ||
git \ | ||
gcc g++ \ | ||
cmake \ | ||
make \ | ||
openssl-dev \ | ||
openssl-libs-static \ | ||
patchelf \ | ||
&& git clone https://github.com/nuclia/nucliadb /root/nucliadb \ | ||
&& pip install maturin | ||
|
||
ENV OPENSSL_NO_VENDOR=1 | ||
|
||
WORKDIR /root/nucliadb | ||
RUN source "$HOME/.cargo/env" \ | ||
&& maturin build -m nucliadb_node/binding/Cargo.toml --release \ | ||
&& pip install target/wheels/*.whl | ||
|
||
FROM python:alpine | ||
|
||
COPY --from=tikv_client \ | ||
/root/client-py/target/wheels/*.whl /root/ | ||
COPY --from=nucliadb \ | ||
/root/nucliadb/target/wheels/*.whl /root/ | ||
|
||
RUN apk --no-cache add \ | ||
gcc g++ \ | ||
&& pip install /root/*.whl \ | ||
&& pip install nucliadb | ||
|
||
ENTRYPOINT ["/usr/local/bin/nucliadb"] |
302ab01
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.
Benchmark
nucliadb/tests/benchmarks/test_search.py::test_search_returns_labels
80.47379783469417
iter/sec (stddev: 0.0001400732267473104
)57.754215104951115
iter/sec (stddev: 0.0006450570552202599
)0.72
nucliadb/tests/benchmarks/test_search.py::test_search_relations
187.39663550466537
iter/sec (stddev: 0.000020177536690075214
)143.60692081092313
iter/sec (stddev: 0.00028576229978305055
)0.77
This comment was automatically generated by workflow using github-action-benchmark.