Code Monkey home page Code Monkey logo

Comments (7)

knauerhase avatar knauerhase commented on August 24, 2024

Edit: rephrased the title because check-issue github action didn't like parentheses in that field.

from milvus.

xiaofan-luan avatar xiaofan-luan commented on August 24, 2024

anyone who familiar with Apptainer please help.

from milvus.

xiaofan-luan avatar xiaofan-luan commented on August 24, 2024

this is what I get from openai:

generate a a file `# Copyright (C) 2019-2022 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.

BootStrap: docker
From: ubuntu:focal-20220426

%environment
export GOPATH=/go
export GOROOT=/usr/local/go
export GO111MODULE=on
export PATH=$GOPATH/bin:$GOROOT/bin:/root/.cargo/bin:$PATH
export VCPKG_FORCE_SYSTEM_BINARIES=1

%post
apt-get update && apt-get install -y --no-install-recommends wget curl ca-certificates gnupg2
g++ gcc gdb gdbserver ninja-build git make ccache libssl-dev zlib1g-dev zip unzip
clang-format-10 clang-tidy-10 lcov libtool m4 autoconf automake python3 python3-pip
pkg-config uuid-dev libaio-dev libopenblas-dev &&
apt-get clean &&
rm -rf /var/lib/apt/lists/*

pip3 install conan==1.61.0

echo "target arch $TARGETARCH"
wget -qO- "https://cmake.org/files/v3.27/cmake-3.27.5-linux-`uname -m`.tar.gz" | tar --strip-components=1 -xz -C /usr/local

mkdir /opt/vcpkg &&  \
    wget -qO- vcpkg.tar.gz https://github.com/microsoft/vcpkg/archive/master.tar.gz | tar --strip-components=1 -xz -C /opt/vcpkg && \
    rm -rf vcpkg.tar.gz

/opt/vcpkg/bootstrap-vcpkg.sh -disableMetrics && ln -s /opt/vcpkg/vcpkg /usr/local/bin/vcpkg && vcpkg version

vcpkg install azure-identity-cpp azure-storage-blobs-cpp gtest

mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.21.10.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
    mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
    go clean --modcache && \
    chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)

mkdir -p /home/milvus/.vscode-server/extensions \
        /home/milvus/.vscode-server-insiders/extensions \
    && chmod -R 777 /home/milvus

curl https://sh.rustup.rs -sSf | \
    sh -s -- --default-toolchain=1.73 -y

%files
build/docker/builder/entrypoint.sh /entrypoint.sh

%runscript
exec /entrypoint.sh

%startscript
exec /entrypoint.sh

%cmd
tail -f /dev/null`

then run sudo singularity build my_container.sif Singularity.def could build an image for singularity

from milvus.

knauerhase avatar knauerhase commented on August 24, 2024

Hi. First, thanks for the quick reply!

Looking at the script, it seems like it would build a mostly-empty container? How would one install actual milvus binaries into the container afterwards?

from milvus.

xiaofan-luan avatar xiaofan-luan commented on August 24, 2024

you are right, you should see how to use this docker file here

code/milvus/build/build_image.sh

from milvus.

xiaofan-luan avatar xiaofan-luan commented on August 24, 2024

`#!/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.

Exit immediately for non zero status

set -e

Print commands

set -x

Absolute path to the toplevel milvus directory.

toplevel=$(dirname "$(cd "$(dirname "${0}")"; pwd)")

OS_NAME="${OS_NAME:-ubuntu20.04}"
MILVUS_IMAGE_REPO="${MILVUS_IMAGE_REPO:-milvusdb/milvus}"
MILVUS_IMAGE_TAG="${MILVUS_IMAGE_TAG:-latest}"

if [ -z "$IMAGE_ARCH" ]; then
MACHINE=$(uname -m)
if [ "$MACHINE" = "x86_64" ]; then
IMAGE_ARCH="amd64"
else
IMAGE_ARCH="arm64"
fi
fi

echo ${IMAGE_ARCH}

BUILD_ARGS="${BUILD_ARGS:---build-arg TARGETARCH=${IMAGE_ARCH}}"

pushd "${toplevel}"

Singularity build command

singularity build "${MILVUS_IMAGE_REPO}_${MILVUS_IMAGE_TAG}.sif" "docker-daemon://${MILVUS_IMAGE_REPO}:${MILVUS_IMAGE_TAG}"

Get image size

image_size=$(singularity exec "${MILVUS_IMAGE_REPO}_${MILVUS_IMAGE_TAG}.sif" du -sh / 2>/dev/null | awk '{print $1}')

echo "Image Size for ${MILVUS_IMAGE_REPO}:${MILVUS_IMAGE_TAG} is ${image_size}"

popd`

from milvus.

xiaofan-luan avatar xiaofan-luan commented on August 24, 2024

change docker build to singularity build might work?

from milvus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.