orztv
commited on
Commit
·
8b17e1c
1
Parent(s):
c01c8f7
update
Browse files- Dockerfile +8 -5
Dockerfile
CHANGED
@@ -60,21 +60,24 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
60 |
pkg-config \
|
61 |
libssl-dev \
|
62 |
# 添加 libclang 依赖
|
63 |
-
llvm \
|
64 |
-
clang \
|
65 |
libclang-dev \
|
|
|
66 |
&& ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
67 |
&& dpkg-reconfigure --frontend noninteractive tzdata \
|
68 |
# 安装 Rust
|
69 |
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
|
70 |
&& . $HOME/.cargo/env \
|
71 |
-
# 设置
|
72 |
-
&&
|
|
|
|
|
|
|
73 |
# 克隆并编译 Qdrant
|
74 |
&& cd /tmp \
|
75 |
&& git clone --depth 1 https://github.com/qdrant/qdrant.git \
|
76 |
&& cd qdrant \
|
77 |
-
&& RUST_BACKTRACE=
|
78 |
&& mv target/release/qdrant /usr/local/bin/ \
|
79 |
&& cd / \
|
80 |
&& rm -rf /tmp/qdrant \
|
|
|
60 |
pkg-config \
|
61 |
libssl-dev \
|
62 |
# 添加 libclang 依赖
|
63 |
+
llvm-dev \
|
|
|
64 |
libclang-dev \
|
65 |
+
clang \
|
66 |
&& ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
67 |
&& dpkg-reconfigure --frontend noninteractive tzdata \
|
68 |
# 安装 Rust
|
69 |
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
|
70 |
&& . $HOME/.cargo/env \
|
71 |
+
# 设置 Rust 编译配置
|
72 |
+
&& CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true \
|
73 |
+
# 查找 libclang.so 的位置
|
74 |
+
&& LIBCLANG_PATH=$(find /usr/lib -name libclang.so.* | head -n 1 | xargs dirname) \
|
75 |
+
&& echo "Found libclang at: ${LIBCLANG_PATH}" \
|
76 |
# 克隆并编译 Qdrant
|
77 |
&& cd /tmp \
|
78 |
&& git clone --depth 1 https://github.com/qdrant/qdrant.git \
|
79 |
&& cd qdrant \
|
80 |
+
&& RUST_BACKTRACE=full LIBCLANG_PATH=${LIBCLANG_PATH} cargo build --release --bin qdrant \
|
81 |
&& mv target/release/qdrant /usr/local/bin/ \
|
82 |
&& cd / \
|
83 |
&& rm -rf /tmp/qdrant \
|