-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
- Loading branch information
1 parent
b7d3e1a
commit 52cd917
Showing
4 changed files
with
103 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,29 @@ | ||
# Copyright (C) 2019-2020 Zilliz. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License | ||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. See the License for the specific language governing permissions and limitations under the License. | ||
|
||
|
||
FROM quay.io/pypa/manylinux_2_28_x86_64 | ||
|
||
RUN yum install -y openblas-devel libatomic-static git && cp /usr/lib/gcc/x86_64-redhat-linux/8/libatomic.a /usr/lib64/ | ||
ENV PATH="/opt/_internal/cpython-3.8.19/bin:${PATH}" | ||
RUN pip3 install conan==1.63.0 | ||
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y | ||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
|
||
RUN mkdir -p /workspace | ||
WORKDIR /workspace | ||
|
||
RUN conan remote add default-conan-local https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local | ||
|
||
COPY build_milvus_lite.sh /workspace/build_milvus_lite.sh | ||
RUN chmod +x /workspace/build_milvus_lite.sh | ||
|
||
ENTRYPOINT ["/workspace/build_milvus_lite.sh"] |
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 @@ | ||
# Build Milvus-Lite In Docker | ||
|
||
## build commond | ||
|
||
```shell | ||
build.sh ${TAG} {$CONAN_CACHE} | ||
``` |
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,33 @@ | ||
#!/bin/bash | ||
|
||
# Licensed to the LF AI & Data foundation under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
TAG="main" | ||
|
||
if [ "$#" -eq 0 ]; then | ||
docker build -t build_milvus_lite:$TAG . \ | ||
&& docker run --rm -v $PWD:/workspace/dist build_milvus_lite:$TAG $TAG | ||
elif [ "$#" -eq 1 ]; then | ||
TAG=$1 | ||
docker build -t build_milvus_lite:$TAG . \ | ||
&& docker run --rm -v $PWD:/workspace/dist build_milvus_lite:$TAG $TAG | ||
elif [ "$#" -eq 2 ]; then | ||
TAG=$1 | ||
CACAN_CACHE=$2 | ||
docker build -t build_milvus_lite:$TAG . \ | ||
&& docker run --rm -e CONAN_USER_HOME=/workspace/conan -v $CACAN_CACHE:/workspace/conan -v $PWD:/workspace/dist build_milvus_lite:$TAG $TAG | ||
fi |
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,34 @@ | ||
#!/bin/bash | ||
|
||
# Licensed to the LF AI & Data foundation under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
tag="main" | ||
|
||
if [ "$#" -eq 1 ]; then | ||
tag=$1 | ||
fi | ||
|
||
echo "Build milvus-lite:$tag" | ||
echo $CONAN_USER_HOME | ||
|
||
git clone --recurse-submodules https://github.com/milvus-io/milvus-lite.git \ | ||
&& cd milvus-lite \ | ||
&& git checkout $tag \ | ||
&& cd python \ | ||
&& python3 setup.py bdist_wheel \ | ||
&& cp -r dist /workspace/ \ | ||
&& cd /workspace && rm -rf milvus-lite |