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

merge lantern_extras and lantern repos #338

Closed
wants to merge 272 commits into from
Closed
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
272 commits
Select commit Hold shift + click to select a range
a1c6815
Change multithreading with channels and portal
var77 Sep 20, 2023
c01e9b7
Fix case sensitivity for table name
var77 Oct 5, 2023
a871568
Add details on pgrx installation
Ngalstyan4 Oct 8, 2023
e57d2a3
Turn onnxruntime into a dynamic dl-opened dependency
Ngalstyan4 Oct 8, 2023
a94240d
Change function argument into const ref
Ngalstyan4 Oct 8, 2023
8c911a4
Take a non-exclusive lock in the common case on the model params
Ngalstyan4 Oct 8, 2023
9942102
Add BSL license (#22)
dqii Oct 16, 2023
7c7ce83
Added lantern-cli package (#18)
var77 Oct 17, 2023
2254d19
Nit: Fix formatting (#25)
dqii Oct 21, 2023
d44c0d5
Add lantern-cli daemon mode (#24)
var77 Oct 30, 2023
d505ca7
Add docker publish action for CLI (#28)
var77 Nov 1, 2023
91b1e17
Add tests for lantern_embeddings and lantern_embeddings core (#27)
var77 Nov 1, 2023
c78a27b
Better handling for sql query formatting (#29)
var77 Nov 3, 2023
62ff52a
Varik/skip column creation (#30)
var77 Nov 4, 2023
5a20fd7
Varik/fix client identifier names (#31)
var77 Nov 8, 2023
51e4af5
Fix typo in trigger name (#32)
var77 Nov 8, 2023
dd32004
Fix notification channel for client (#33)
var77 Nov 8, 2023
613b103
Add dst_column to trigger and function names (#34)
var77 Nov 21, 2023
279f72a
Explicitly specify ort version (#36)
var77 Nov 21, 2023
fd804df
Create lock table in lantern schema hash trigger names (#37)
var77 Nov 21, 2023
018f804
Create client function and trigger names with job_id instead of hash …
var77 Nov 22, 2023
2e9573c
Collect update jobs non-blocking (#39)
var77 Nov 23, 2023
ef4e299
Add progress and usage tracking (#40)
var77 Nov 23, 2023
e13d286
Add model speed measurement script (#41)
var77 Nov 24, 2023
7d53268
Fix data_producer deadlock, remove unwraps (#42)
var77 Nov 25, 2023
4e86a66
Add db connect timeout (#43)
var77 Nov 25, 2023
8b0858e
Index autotune and import (#44)
var77 Dec 4, 2023
084b28e
Optimize batch size for models (#46)
var77 Dec 5, 2023
d82daa0
Check memory usage to avoid OOM Errors (#45)
var77 Dec 6, 2023
9d334e3
Index Autotune Improvements (#47)
var77 Dec 11, 2023
5098036
Remove index file after import (#48)
var77 Dec 14, 2023
03acdfc
Add external index functions to SQL and make index creation in one tr…
var77 Dec 18, 2023
55d3bea
Take relation instead of index id, encapsulate reindex function in sc…
var77 Dec 19, 2023
eb8bb10
Gracefully exit ongoing embedding job if the job is canceled from db …
var77 Dec 19, 2023
629adfd
Add checks for downloading images (#52)
var77 Dec 20, 2023
e10373d
Autotune bugfix and reduce memory consumption for index creation (#53)
var77 Dec 21, 2023
b9de6da
External index jobs (#54)
var77 Dec 25, 2023
21a0e29
Added CI tests (#55)
var77 Dec 26, 2023
c6c2ca5
Fix sample size to take from test table count (#56)
var77 Dec 27, 2023
0580f78
Optimize memory usage for index creation (#57)
var77 Jan 1, 2024
5b13ce5
Change chunk size when copying file to postgres to boost performance …
var77 Jan 2, 2024
d9c14f6
Update batch size for jina models (#59)
var77 Jan 4, 2024
754021e
External index wait for lock (#60)
var77 Jan 4, 2024
69db0ce
Add token count to speed tests (#61)
var77 Jan 5, 2024
62beecd
Save index file in postgres data dir (#62)
var77 Jan 6, 2024
b8e081e
Autotune schema refactor (#63)
var77 Jan 8, 2024
0bcb18b
Dynamic input batching for jinaai models (#64)
var77 Jan 9, 2024
fa8dceb
Commit transaction on local datase connection when creating external …
var77 Jan 9, 2024
3b0b4a0
Add runtime mechanism in embeddings core, refactor code (#66)
var77 Jan 16, 2024
8f59dc9
Limit test concurrency to 1 in CI (#67)
var77 Jan 16, 2024
243acf2
Rename models and update tests (#68)
var77 Jan 16, 2024
d47b26a
Fix external index metric and add retry policy to HTTP runtime (#69)
var77 Jan 17, 2024
e7934a4
Add ARM runner on CI (#71)
var77 Jan 29, 2024
c8adb7f
Handle null values in index creation (#74)
var77 Jan 30, 2024
326a244
usearch new interface (#70)
var77 Feb 7, 2024
4c2c0c6
Add update support for embedding jobs on daemon
var77 Jan 30, 2024
fe6386b
Lantern embeddings: use ctid as pk and delete row lock after job is c…
var77 Feb 6, 2024
7422c5d
Lantern autotune: use ctid as pk, remove pk arg and update README
var77 Feb 6, 2024
b8b8b58
Lantern embeddings: fix row unlock functionality and add test
var77 Feb 6, 2024
abc5b0a
Set client triggers before job start, add tests, fix progress bug
var77 Feb 8, 2024
b267d89
Upgrade pgrx to 0.11.3, add pg16 support, rename src to lib in packag…
var77 Feb 8, 2024
9927c66
Lantern embeddings: Add input token count and track in usage
var77 Feb 8, 2024
9fc1067
Lantern embeddings: Add new openai models
var77 Feb 8, 2024
d506866
Update lanter version on ci, fix tests
var77 Feb 9, 2024
8f9ec16
Update rust version in docker
var77 Feb 9, 2024
8d53997
Fix embedding usage function name
var77 Feb 15, 2024
4a862dd
Add tests for embedding usage tracking
var77 Feb 15, 2024
6a7714d
Expand backoff mechanism for body validation as well
var77 Feb 16, 2024
bc6c049
Implement product quantization in lantern cli
var77 Feb 10, 2024
a8d887a
Process all splits in parallel
var77 Feb 11, 2024
2bf0ccc
Add subvector-id argument and ability to horizontally scale the runni…
var77 Feb 11, 2024
a6a1c50
Fix progress tracking for pq
var77 Feb 11, 2024
8825e3e
Fix indexing bug
var77 Feb 11, 2024
908d0db
Parallelize vector compression
var77 Feb 12, 2024
2b5ffe2
Parallelize data fetching and export
var77 Feb 12, 2024
071cee8
Refactor and separate code parts
var77 Feb 14, 2024
cea3f6a
Refactor code, pack arguments in a struct
var77 Feb 15, 2024
92da38c
Add gcp batch job flow
var77 Feb 15, 2024
99974aa
Add tests for lantern_pq
var77 Feb 16, 2024
8d06963
Add action to push cli image to GCR
var77 Feb 16, 2024
ef6bc54
Remove unnecessary arguments
var77 Feb 16, 2024
d42719f
Rename codebook table and params to match lantern pq
var77 Feb 19, 2024
96b9ff6
Fix naming issues, add --dataset-limit argument
var77 Feb 20, 2024
bce7aa2
Conditionaliy publish latest tag for cli docker image
var77 Feb 20, 2024
b0e0217
Use renamed lantern access method
Ngalstyan4 Feb 17, 2024
6151ddf
Release v0.2.0
Ngalstyan4 Feb 17, 2024
1619b71
Temporarily change lantern tag for testing before lantern is released
Ngalstyan4 Feb 17, 2024
6e57e6b
Implement pq-quantization in external index construction
Ngalstyan4 Feb 20, 2024
21876f2
Fix codebook offset bug
Ngalstyan4 Feb 20, 2024
dce46ed
set pq parameter in index construction when importing
Ngalstyan4 Feb 20, 2024
6dce519
Fix codebook lifetime bug in rust<->C interface
Ngalstyan4 Feb 21, 2024
493cd67
Prepare for release
Ngalstyan4 Feb 21, 2024
3b51d4b
Fix naming for uppercase table names, check if codebook table exists …
var77 Feb 21, 2024
437b548
Add pq argument for external index reindexing
var77 Feb 21, 2024
eed1443
Add base_url param for OpenAi runtime
var77 Feb 16, 2024
c3335bc
Fix openai args, bump version
var77 Feb 20, 2024
32461b0
Fix openai model default dims to 1536, add base_url param from sql
var77 Feb 20, 2024
592bfaa
Fix authorization for openai azure deployment
var77 Feb 20, 2024
6cf6c92
Add GUC for OpenAI base url
var77 Feb 21, 2024
2f6e3d3
Change codebook table name prefix to pq_
var77 Feb 22, 2024
9d5fb9a
Add codebook table name size validation
var77 Feb 22, 2024
86db8d8
Fix range bug for pq data fetching
var77 Feb 23, 2024
d5ae7fd
Merge cli packages into one crate
var77 Feb 23, 2024
a9af359
Remove lantern_ prefix from cli modules
var77 Feb 23, 2024
228241c
Remove unnecessary features
var77 Feb 23, 2024
4c0cb68
Remove unintended change of sql trigger names
var77 Feb 24, 2024
a8f2a71
Fix lantern version
var77 Feb 24, 2024
2b2c05e
Omit invalid images when generating visual embeddings
var77 Feb 26, 2024
7c51f96
Put invalid vector for broken images
var77 Feb 26, 2024
bbd8e16
Do mean pooling for jina embeddings
var77 Feb 27, 2024
7fb31e3
Fix usage function in tests
var77 Feb 27, 2024
69eab2d
Select random subset from dataset if limit is passed
var77 Feb 29, 2024
28ea40e
Add time logs for external indexing
var77 Feb 29, 2024
09e3a80
Fix pq tests
var77 Feb 29, 2024
610b90b
Pass dataset limit to gcp jobs
var77 Feb 29, 2024
b77db72
Add allocation policy to gcp batch jobs
var77 Mar 1, 2024
a1f50ca
Use attention mask to zero padded tokens when mean pooling
var77 Mar 1, 2024
618dabe
Fix offset bug in gcp job
var77 Mar 2, 2024
41872a1
Fix typo in log
var77 Mar 2, 2024
33c42e3
[WIP] add http server with actix
var77 Feb 29, 2024
932c0b4
[WIP] Add routes for http interface
var77 Mar 4, 2024
ba3b377
Fix insert and search routes, add pq routes, add api docs [WIP]
var77 Mar 5, 2024
009c723
Add tests for HTTP server, improve docs, add features to cli crate
var77 Mar 6, 2024
796b44a
Install extras extension in CI for CLI tests
var77 Mar 6, 2024
8cd792c
Call CREATE EXTENSION for extras in CI
var77 Mar 6, 2024
d301cac
Make feature dependencies optional, add overwrite argument to pq
var77 Mar 6, 2024
fded947
Fix openai issue for full sequence
var77 Mar 6, 2024
2f31d6d
Increase http api batch sizes to use parallel cores
var77 Mar 6, 2024
f9decf5
Send index definitions on collection response
var77 Mar 7, 2024
e91b376
Set max batch size to embeddings when exporting results
var77 Mar 9, 2024
002ffe5
Ignore embedding rows which has empty string
var77 Mar 9, 2024
1401b22
Add connection ping for client database, retry failed updates after 5…
var77 Mar 13, 2024
746890b
Update version
var77 Mar 13, 2024
0edde8a
Separate db connections for each daemon task
var77 Mar 13, 2024
445f50a
Add caching to cargo builds
var77 Mar 11, 2024
4094e2b
Move pg configuration to different function
var77 Mar 11, 2024
92b9d8d
Fix tests for CI, increase body limit for http
var77 Mar 13, 2024
fa6ab2c
Improve copy performance
var77 Mar 14, 2024
c9bac64
Reduce optimization level for ci builds
var77 Mar 14, 2024
2e88d8e
Update version [skip ci]
var77 Mar 14, 2024
a81c989
Add basic auth to http server
var77 Mar 14, 2024
9c9d5b6
Make channels unbounded, change Atomic to Channel (#100)
var77 Mar 15, 2024
c28e687
Stream init job instead of blocking thread
var77 Mar 16, 2024
9d1b69b
Fix batch size and channel type for embedding jobs
var77 Mar 17, 2024
3391fc3
Bump version
var77 Mar 17, 2024
ed3e35c
Add bge m3 model
var77 Mar 18, 2024
7e084b5
Configure model params for bge m3 model
var77 Mar 18, 2024
c0ae274
Change ctid to id for daemon embedding jobs, because of ctid concurre…
var77 Mar 26, 2024
8f9c426
Update version in ci
var77 Mar 26, 2024
1de0053
Fix cuda version in docker
var77 Mar 26, 2024
52fae8c
Fix libnvrtc.so not found error for cli cuda image
var77 Mar 26, 2024
81a5dbc
Bring back pk argument for embeddings
var77 Mar 26, 2024
810fc87
Use pk in producer_worker of embedding
var77 Mar 26, 2024
84934e0
Track failed embedding requests
var77 Mar 20, 2024
130ab44
Update version
var77 Mar 26, 2024
e5c0565
Set default value for --create-column to false
var77 Mar 26, 2024
262c0e6
Add arm64 platform to CLI docker publish
var77 Mar 29, 2024
a652da1
Fix onnxlib for arm64
var77 May 3, 2024
4a46b9d
remove unnecessary if statement from dockerfile
var77 May 10, 2024
36943d6
update usearch to new verison, bump versions to 0.2.0
var77 May 13, 2024
9d06eda
rollback cargo config file format
var77 May 13, 2024
7cf70ad
Update filter to ignore source embeddings from daemon
var77 May 28, 2024
d3ffecb
Update rustc to 1.78 in dockerfiles
var77 May 28, 2024
74611af
Client listener bug when passing wrong argument order
var77 May 29, 2024
333ed52
Check ignore filter before sending notification from trigger
var77 May 29, 2024
a7fe787
Make daemon jobs to run from client database tables, add master_db ar…
var77 May 22, 2024
4e91806
Add tests, get rid of static maps
var77 May 28, 2024
1970985
Update lanern version in CI
var77 May 28, 2024
8b13cb8
Add more tests for daemon embedding jobs, fix bugs related job stream…
var77 May 29, 2024
3ea92df
Handle database connection failures and restart jobs for daemon
var77 May 31, 2024
2bc6305
use usearch with old lantern storage
var77 May 31, 2024
07f95c3
update lantern version in ci
var77 May 31, 2024
bf4bf5c
change default name for databases table
var77 May 31, 2024
261ee39
Keep embedding usage info in a table
var77 Jun 2, 2024
4f0b1f3
Create index on embedding usage table
var77 Jun 3, 2024
4de0b62
change client job static map to local map, fix underflow subtraction …
var77 Jun 3, 2024
468c240
add labels to embedding jobs, fix init_finished_at for empty tables
var77 Jun 7, 2024
5f68525
remove unnecessarry migration
var77 Jun 7, 2024
75dcd6b
Add code coverage info (#119)
var77 Jun 12, 2024
ffdea61
Splade v3 model (#123)
var77 Jun 12, 2024
d947a44
Add daemon functions in lantern_extras extension (#120)
var77 Jun 13, 2024
35962e8
add healthcheck for master db listener
var77 Jun 17, 2024
eaf0717
convert embedding generation code to async, so mutexes wont block io …
var77 Jun 17, 2024
0338813
add bytes to embedding deps
var77 Jun 17, 2024
1e72d5e
remove unnecessarry tokio runtime creation on http_runtime
var77 Jun 17, 2024
9d6e9e1
run daemon jobs from a single central queue
var77 Jun 18, 2024
7d414d7
add healthcheck for db notification listener tasks
var77 Jun 18, 2024
0dfe4df
fix error for running blocking tasks inside tokio runtime
var77 Jun 21, 2024
1430c32
remove long living portal from streaming embedding jobs to not block …
var77 Jun 20, 2024
ab1f6bb
use another table to keep row ids for init streaming jobs
var77 Jun 22, 2024
c4b0ee1
rename _lantern_internal schema to _lantern_extras_internal
var77 Jun 22, 2024
a367a93
update version
var77 Jun 22, 2024
d7f98d6
create _lantern_extras_internal schema on http server setup
var77 Jun 23, 2024
b4cf733
reserve 20% progress for index import by increasing row count in exte…
var77 Jun 24, 2024
2dfee22
maove http collections schema nameto constant
var77 Jun 24, 2024
f7ce61b
add dynamic batching for splade-v3 model
var77 Jun 27, 2024
563e111
properly close embedding jobs to avoid duplicates on failure retry
var77 Jun 30, 2024
0a3b170
use child_token for spawned jobs to cancel on parent process exit
var77 Jun 30, 2024
9c258af
Update usearch to support lantern 0.3+
var77 Jul 5, 2024
2e89f8d
Optimize relu max pooling and fix sql query for non-integer primary k…
var77 Jul 6, 2024
1fa63b7
Optimize relu_max_pooling and mean_pooling functions
var77 Jul 8, 2024
9b3c403
Limit update batching for embedding jobs to specified defaults
var77 Jul 8, 2024
99c6c63
do not take any other jobs if daemon has specified label
var77 Jul 8, 2024
464de77
fix bug for initial label caching, update tests
var77 Jul 8, 2024
ffa8818
remove cache for labels and handle label updates in update processor,…
var77 Jul 8, 2024
c9e1ee6
make daemon label check more strict, so jobs with specified labels wi…
var77 Jul 10, 2024
7f5463a
fix progress issue in external indexing for small tables, change sess…
var77 Jul 11, 2024
90656b6
add external indexing tcp server, which will accept streamed tuples f…
var77 Jul 16, 2024
63d0d1a
Fix external index resizing segfault, add tests for external index se…
var77 Jul 16, 2024
cb878ce
Update lantern version on CI
var77 Jul 16, 2024
e9b33ed
take scalar quantization from params
var77 Jul 17, 2024
dc8c960
properly parse distance metric
var77 Jul 17, 2024
d484b9a
add tmp_directory option, make tests consistent over platforms
var77 Jul 17, 2024
fd30bb3
set socket timeout for both read and write
var77 Jul 18, 2024
ef0f94b
fix tuple parsing for bit arrays, add test for hamming distance
var77 Jul 23, 2024
f64df19
update cli version
var77 Jul 23, 2024
7c250e8
correctly handle error when target db url is not valid and wrong op c…
var77 Jul 26, 2024
2797cee
add ssl config to external indexing server
var77 Aug 2, 2024
b053f68
cleanup tmp indexes after indexing finishes or errors, show some stat…
var77 Sep 5, 2024
73ea19a
send server type on start, add status server
var77 Sep 13, 2024
8d54349
write tests for external indexing status server
var77 Sep 13, 2024
9f6495b
send error message length in case of error
var77 Sep 13, 2024
1ca8f5a
send protocol version on first message
var77 Sep 13, 2024
9277fd2
fix memory leak in exernal indexing by not shadowing the variable
var77 Sep 17, 2024
8d52242
push containers with cpu-native build for common intel CPUs
var77 Sep 18, 2024
84feb25
show indexing speed in logs
var77 Sep 18, 2024
c458731
update cli to 0.3.24
var77 Sep 18, 2024
b6df5fe
pass usearch defines to enable simsimd and native f16 for optimized b…
var77 Sep 23, 2024
19c51fa
add more target architectures
var77 Sep 24, 2024
cee7ee9
add quantization support for external indexing
var77 Sep 4, 2024
7fba4a9
parse vector elements based on element_bits passed from header
var77 Sep 24, 2024
45091e5
use usearch add_raw to avoid double type conversion and accelerate fo…
var77 Sep 25, 2024
32a70e6
upgrade usearch, remove cpu-optimized build as new version of usearch…
var77 Sep 26, 2024
2c1847e
revert usearch update, birng back the x64 optimized builds
var77 Sep 27, 2024
ce8995d
update usearch to use upstream version
var77 Sep 27, 2024
1606459
remove saphirerapids build from CI
var77 Sep 30, 2024
be94557
replace isahc with reqwest, as isahc creates thread-pool on import wh…
var77 Oct 2, 2024
3a196af
add background worker for daemon in lantern_extras extension, fix tes…
var77 Oct 2, 2024
7aad65d
use GUC variables for openai and cohere tokens for default values on …
var77 Oct 2, 2024
da3c483
convert status server to actix server
var77 Oct 3, 2024
fb6d7bd
increase timeout for file download
var77 Oct 3, 2024
94e2d56
update cli version
var77 Oct 3, 2024
664f1a7
add data path to daemon to store models in postgres data dir when run…
var77 Oct 7, 2024
aabbefc
merge lantern_extras and lantern repos, modify CI scripts to work wit…
var77 Oct 7, 2024
ea9300e
fix script path
var77 Oct 7, 2024
906bef1
fix bash script for ci
var77 Oct 7, 2024
0b8c9af
fix name pattern for download-artifact
var77 Oct 7, 2024
e7cb17c
fix test_extras workflow
var77 Oct 7, 2024
544d386
fix extras path for install
var77 Oct 7, 2024
07538c1
merge lantern and lantern_extras repos
var77 Oct 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 48 additions & 0 deletions Dockerfile.cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
FROM rust:1.78.0 as build
# Copy the files in your machine to the Docker image
WORKDIR /app
COPY . .
ENV ORT_STRATEGY="system"
ARG RUSTFLAGS=""
ENV RUSTFLAGS=$RUSTFLAGS
ARG CXXFLAGS=""
ENV CXXFLAGS=$CXXFLAGS

ENV CC=/usr/bin/clang-18
ENV CXX=/usr/bin/clang++-18
# Remove lantern_extras from workspace
RUN rm -rf lantern_extras && sed -i -e 's/"lantern_extras",//' Cargo.toml

# Build your program for release
RUN apt update && \
apt install -y --no-install-recommends lsb-release wget software-properties-common gnupg pkg-config curl libssl-dev && \
curl -s https://apt.llvm.org/llvm.sh | bash -s -- 18 && \
cargo build --release --package lantern_cli

FROM debian:12
COPY --from=build /app/target/release/lantern-cli .
ARG TARGETARCH
ENV OS_ARCH="${TARGETARCH:-amd64}"

RUN apt update && \
apt install -y wget && apt clean

# Download onnxruntime
RUN cd /tmp && \
ONNX_VERSION="1.16.1" && \
PACKAGE_URL="https://github.com/microsoft/onnxruntime/releases/download/v${ONNX_VERSION}/onnxruntime-linux-x64-${ONNX_VERSION}.tgz" && \
case "$OS_ARCH" in \
arm*|aarch64) \
PACKAGE_URL="https://github.com/microsoft/onnxruntime/releases/download/v${ONNX_VERSION}/onnxruntime-linux-aarch64-${ONNX_VERSION}.tgz"; \
esac && \
mkdir -p /usr/local/lib && \
cd /usr/local/lib && \
wget -qq $PACKAGE_URL && \
tar xzf ./onnx*.tgz && \
rm -rf ./onnx*.tgz && \
mv ./onnx* ./onnxruntime

ENV ORT_STRATEGY=system
ENV ORT_DYLIB_PATH=/usr/local/lib/onnxruntime/lib/libonnxruntime.so
# Run the binary
ENTRYPOINT ["./lantern-cli"]
38 changes: 38 additions & 0 deletions Dockerfile.cli.cuda
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM rust:1.78.0 as build
# Copy the files in your machine to the Docker image
WORKDIR /app
COPY . .

# Remove lantern_extras from workspace
RUN rm -rf lantern_extras && sed -i -e 's/"lantern_extras",//' Cargo.toml

ENV CC=/usr/bin/clang-18
ENV CXX=/usr/bin/clang++-18
# Build your program for release
RUN apt update && \
apt install -y --no-install-recommends lsb-release wget software-properties-common gnupg pkg-config curl libssl-dev && \
curl -s https://apt.llvm.org/llvm.sh | bash -s -- 18 && \
cargo build --release --package lantern_cli

FROM nvcr.io/nvidia/cuda:11.8.0-runtime-ubuntu22.04
COPY --from=build /app/target/release/lantern-cli .
RUN apt update && \
apt install -y wget && apt clean
# Download onnxruntime
RUN mkdir -p /usr/local/lib && \
cd /usr/local/lib && \
wget -q https://github.com/microsoft/onnxruntime/releases/download/v1.16.1/onnxruntime-linux-x64-gpu-1.16.1.tgz && \
tar xzf ./onnx*.tgz && \
rm -rf ./onnx*.tgz && \
mv ./onnx* ./onnxruntime

# Install libcudnn
RUN wget -q https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/libcudnn8_8.7.0.84-1+cuda11.8_amd64.deb -O libcudnn.deb && \
dpkg -i libcudnn.deb && \
rm -rf libcudnn.deb

RUN ln -s /usr/local/cuda/targets/x86_64-linux/lib/libnvrtc.so.11.2 /usr/local/cuda/targets/x86_64-linux/lib/libnvrtc.so
ENV ORT_STRATEGY=system
ENV ORT_DYLIB_PATH=/usr/local/lib/onnxruntime/lib/libonnxruntime.so
# Run the binary
ENTRYPOINT ["./lantern-cli"]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
TITLE.
TITLE.
30 changes: 30 additions & 0 deletions ci/scripts/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

source "$(dirname "$0")/get_arch_and_platform.sh"
cd $BUILD_DIR
EXT_VERSION=$(cmake --system-information | awk -F= '$1~/CMAKE_PROJECT_VERSION:STATIC/{print$2}')
PACKAGE_NAME=lantern-${EXT_VERSION}-postgres-${PG_VERSION}-${PLATFORM}-${ARCH}

mkdir -p ${BUILD_DIR}/${PACKAGE_NAME}/src
cp ${SOURCE_DIR}/scripts/packaging/* ${BUILD_DIR}/${PACKAGE_NAME}/

# For Mac OS and Postgres 16 the module will have .dylib extension
# Instead of .so, so any of the files may not exist
# So we will ignore the error from cp command
cp ${BUILD_DIR}/*.{so,dylib} ${BUILD_DIR}/${PACKAGE_NAME}/src 2>/dev/null || true
cp -r ${BUILD_DIR}/bitcode ${BUILD_DIR}/${PACKAGE_NAME}/src/bitcode 2>/dev/null || true
cp ${BUILD_DIR}/*.sql ${BUILD_DIR}/${PACKAGE_NAME}/src

for f in $(find "${SOURCE_DIR}/sql/updates/" -name "*.sql"); do
dest_filename=$(echo $f | sed -E 's#(.*)/(.*\.sql)#lantern--\2#g')
cp $f ${BUILD_DIR}/${PACKAGE_NAME}/src/${dest_filename}
done

cp ${BUILD_DIR}/lantern.control ${BUILD_DIR}/${PACKAGE_NAME}/src

cd ${BUILD_DIR} && tar cf ${PACKAGE_NAME}.tar ${PACKAGE_NAME}
rm -rf ${BUILD_DIR}/${PACKAGE_NAME}

## Write output so we can use this in actions and upload artifacts
echo "archive_package_name=${PACKAGE_NAME}.tar" >> "/tmp/gh-output.txt"
echo "archive_package_path=${BUILD_DIR}/${PACKAGE_NAME}.tar" >> "/tmp/gh-output.txt"
70 changes: 0 additions & 70 deletions lantern_cli/Cargo.toml

This file was deleted.

39 changes: 0 additions & 39 deletions lantern_cli/src/cli.rs

This file was deleted.

Loading