From 1814216141956e0bb83654b7d64d558cd09f2a43 Mon Sep 17 00:00:00 2001 From: ashione Date: Thu, 4 Apr 2024 21:15:42 +0800 Subject: [PATCH 1/9] add docker dev builder --- README.rst | 1 + docker/Dockerfile-dev | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 docker/Dockerfile-dev diff --git a/README.rst b/README.rst index 761160fb..8ab426d6 100644 --- a/README.rst +++ b/README.rst @@ -3,6 +3,7 @@ :alt: mobius Mobius : Online Machine Learning. + ============ `Mobius `_ is an AI infra platform including realtime computing and training. diff --git a/docker/Dockerfile-dev b/docker/Dockerfile-dev new file mode 100644 index 00000000..17bf3ac5 --- /dev/null +++ b/docker/Dockerfile-dev @@ -0,0 +1,10 @@ +FROM ubuntu:22.04 +RUN apt-get update +RUN apt-get install -yq software-properties-common +RUN add-apt-repository -y ppa:deadsnakes/ppa +RUN apt-get install -yq wget gcc g++ openjdk-8-jdk maven python3.8 zlib1g-dev zip git pip +RUN git clone https://github.com/ray-project/mobius.git +RUN sh -c "bash mobius/scripts/install-bazel.sh" +RUN python3 -m pip install virtualenv +RUN python3 -m virtualenv -p python3 py3 +RUN pip install pytest "protobuf<4" \ No newline at end of file From aa2399359d5017672f9292719a17261f2cdbae76 Mon Sep 17 00:00:00 2001 From: ashione Date: Thu, 4 Apr 2024 21:18:10 +0800 Subject: [PATCH 2/9] update read me --- README.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 8ab426d6..72910d5d 100644 --- a/README.rst +++ b/README.rst @@ -3,7 +3,6 @@ :alt: mobius Mobius : Online Machine Learning. - ============ `Mobius `_ is an AI infra platform including realtime computing and training. @@ -13,7 +12,7 @@ Mobius : Online Machine Learning. .. image:: https://github.com/ray-project/mobius/workflows/macos-building/badge.svg :target: https://github.com/ray-project/mobius/actions/workflows/macos-building.yml -| + Ray Streaming ============= From 89369f4318f9d3910828a250f3258e3a8286fe9c Mon Sep 17 00:00:00 2001 From: ashione Date: Thu, 4 Apr 2024 22:21:36 +0800 Subject: [PATCH 3/9] add arm64 bazel pkg install --- scripts/install-bazel.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/install-bazel.sh b/scripts/install-bazel.sh index b721148f..3e2f6ad1 100755 --- a/scripts/install-bazel.sh +++ b/scripts/install-bazel.sh @@ -22,10 +22,20 @@ case "${OSTYPE}" in ;; esac echo "platform is ${platform}" +arm=`uname -m | grep arm` +echo $arm -if [ "${platform}" = "darwin" ]; then +if [ "${platform}" = "darwin" ] && [ "${arm}" != "arm64" ]; then wget "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-installer-darwin-x86_64.sh" -O bazel-5.4.1-installer-darwin-x86_64.sh sh bazel-5.4.1-installer-darwin-x86_64.sh +elif [ "${platform}" = "darwin" ] && [ "${arm}" = "arm64" ]; then + wget "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-darwin-arm64" -O bazel-5.4.1-darwin-arm64 + chmod a+x bazel-5.4.1-darwin-arm64 + sh bazel-5.4.1-darwin-arm64 +elif [ "${platform}" = "linux" ] && [ "${arm}" = "arm64" ]; then + wget "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-linux-arm64" -O bazel_5.4.1-linux-arm64 + chmod a+x bazel_5.4.1-linux-arm64 + sh bazel_5.4.1-linux-arm64 else wget "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel_5.4.1-linux-x86_64.deb" -O bazel_5.4.1-linux-x86_64.deb dpkg -i bazel_5.4.1-linux-x86_64.deb From 968d6a0b51172f22329d0563e46241db2b0bbb61 Mon Sep 17 00:00:00 2001 From: ashione Date: Thu, 4 Apr 2024 22:27:19 +0800 Subject: [PATCH 4/9] show current os arch --- scripts/install-bazel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install-bazel.sh b/scripts/install-bazel.sh index 3e2f6ad1..91fc7c2e 100755 --- a/scripts/install-bazel.sh +++ b/scripts/install-bazel.sh @@ -23,7 +23,7 @@ case "${OSTYPE}" in esac echo "platform is ${platform}" arm=`uname -m | grep arm` -echo $arm +echo "current arch is $arm" if [ "${platform}" = "darwin" ] && [ "${arm}" != "arm64" ]; then wget "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-installer-darwin-x86_64.sh" -O bazel-5.4.1-installer-darwin-x86_64.sh From 8fbbe77ed613b2e490f411398da84b2674793ceb Mon Sep 17 00:00:00 2001 From: ashione Date: Thu, 4 Apr 2024 22:51:56 +0800 Subject: [PATCH 5/9] assign aarch64 to arm64 --- scripts/install-bazel.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/install-bazel.sh b/scripts/install-bazel.sh index 91fc7c2e..07aa82e3 100755 --- a/scripts/install-bazel.sh +++ b/scripts/install-bazel.sh @@ -1,6 +1,7 @@ #!/bin/bash # Current github bazel version is 5.0.0 platform="unknown" +arm=`uname -a | grep -o -m 1 -e "arm" -e "aarch64" | head -n 1`` case "${OSTYPE}" in msys) @@ -22,9 +23,12 @@ case "${OSTYPE}" in ;; esac echo "platform is ${platform}" -arm=`uname -m | grep arm` echo "current arch is $arm" +if [ "${arm}" = "aarch64" ]; then + arm="arm64" +fi + if [ "${platform}" = "darwin" ] && [ "${arm}" != "arm64" ]; then wget "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-installer-darwin-x86_64.sh" -O bazel-5.4.1-installer-darwin-x86_64.sh sh bazel-5.4.1-installer-darwin-x86_64.sh From 87582b001ebfd9cbf89a0204c198390c9f008891 Mon Sep 17 00:00:00 2001 From: ashione Date: Thu, 4 Apr 2024 22:53:14 +0800 Subject: [PATCH 6/9] fix typo --- scripts/install-bazel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install-bazel.sh b/scripts/install-bazel.sh index 07aa82e3..b1ff7dbf 100755 --- a/scripts/install-bazel.sh +++ b/scripts/install-bazel.sh @@ -1,7 +1,7 @@ #!/bin/bash # Current github bazel version is 5.0.0 platform="unknown" -arm=`uname -a | grep -o -m 1 -e "arm" -e "aarch64" | head -n 1`` +arm=`uname -a | grep -o -m 1 -e "arm" -e "aarch64" | head -n 1` case "${OSTYPE}" in msys) From f130e1e8a49bf339b0165eaa2c7d477bf843111b Mon Sep 17 00:00:00 2001 From: ashione Date: Sat, 6 Apr 2024 22:05:07 +0800 Subject: [PATCH 7/9] install bazel script remove download resources --- docker/Dockerfile-dev | 4 ++-- scripts/install-bazel.sh | 26 ++++++++++++++++++-------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/docker/Dockerfile-dev b/docker/Dockerfile-dev index 17bf3ac5..49bfe11b 100644 --- a/docker/Dockerfile-dev +++ b/docker/Dockerfile-dev @@ -2,8 +2,8 @@ FROM ubuntu:22.04 RUN apt-get update RUN apt-get install -yq software-properties-common RUN add-apt-repository -y ppa:deadsnakes/ppa -RUN apt-get install -yq wget gcc g++ openjdk-8-jdk maven python3.8 zlib1g-dev zip git pip -RUN git clone https://github.com/ray-project/mobius.git +RUN DEBIAN_FRONTEND=noninteractive apt-get install -yq wget gcc g++ openjdk-8-jdk maven python3.8 zlib1g-dev zip git pip +RUN git clone -b dev-docker-builder https://github.com/ray-project/mobius.git RUN sh -c "bash mobius/scripts/install-bazel.sh" RUN python3 -m pip install virtualenv RUN python3 -m virtualenv -p python3 py3 diff --git a/scripts/install-bazel.sh b/scripts/install-bazel.sh index b1ff7dbf..6d224496 100755 --- a/scripts/install-bazel.sh +++ b/scripts/install-bazel.sh @@ -29,20 +29,30 @@ if [ "${arm}" = "aarch64" ]; then arm="arm64" fi +bazel_exe_file="" + if [ "${platform}" = "darwin" ] && [ "${arm}" != "arm64" ]; then - wget "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-installer-darwin-x86_64.sh" -O bazel-5.4.1-installer-darwin-x86_64.sh - sh bazel-5.4.1-installer-darwin-x86_64.sh + bazel_exe_file="bazel-5.4.1-installer-darwin-x86_64.sh" + wget "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-installer-darwin-x86_64.sh" -O $bazel_exe_file + sh $bazel_exe_file elif [ "${platform}" = "darwin" ] && [ "${arm}" = "arm64" ]; then wget "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-darwin-arm64" -O bazel-5.4.1-darwin-arm64 chmod a+x bazel-5.4.1-darwin-arm64 - sh bazel-5.4.1-darwin-arm64 + cp bazel-5.4.1-darwin-arm64 /usr/bin/bazel elif [ "${platform}" = "linux" ] && [ "${arm}" = "arm64" ]; then - wget "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-linux-arm64" -O bazel_5.4.1-linux-arm64 - chmod a+x bazel_5.4.1-linux-arm64 - sh bazel_5.4.1-linux-arm64 + bazel_exe_file="bazel_5.4.1-linux-arm64" + wget "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-linux-arm64" -O $bazel_exe_file + chmod a+x $bazel_exe_file + cp $bazel_exe_file /usr/bin/bazel else - wget "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel_5.4.1-linux-x86_64.deb" -O bazel_5.4.1-linux-x86_64.deb - dpkg -i bazel_5.4.1-linux-x86_64.deb + bazel_exe_file="bazel_5.4.1-linux-x86_64.deb" + wget "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel_5.4.1-linux-x86_64.deb" -O $bazel_exe_file + dpkg -i $bazel_exe_file +fi + +if [ -e $bazel_exe_file ]; then + echo "Remove download file $bazel_exe_file" + rm $bazel_exe_file fi bazel --version From 1a71f2afef5eb03c47a4d6f68c44560cc9bd3a2e Mon Sep 17 00:00:00 2001 From: ashione Date: Sat, 6 Apr 2024 23:50:48 +0800 Subject: [PATCH 8/9] add build instruction --- README.rst | 7 +++++++ docker/Dockerfile-dev | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 72910d5d..0c72f099 100644 --- a/README.rst +++ b/README.rst @@ -4,6 +4,7 @@ Mobius : Online Machine Learning. ============ + `Mobius `_ is an AI infra platform including realtime computing and training. .. image:: https://github.com/ray-project/mobius/workflows/ubuntu-building/badge.svg @@ -156,6 +157,12 @@ Key Features **Validation for continuous model delivery**. A validation mechanism to help our system keep delivering high-quality models and intercept all the abnormal models. +Build +---------------- + +- Build a docker using docker/Dockerfile-env +- Execute `scripts/install.sh` + Getting Involved ---------------- diff --git a/docker/Dockerfile-dev b/docker/Dockerfile-dev index 49bfe11b..c044ad88 100644 --- a/docker/Dockerfile-dev +++ b/docker/Dockerfile-dev @@ -3,7 +3,7 @@ RUN apt-get update RUN apt-get install -yq software-properties-common RUN add-apt-repository -y ppa:deadsnakes/ppa RUN DEBIAN_FRONTEND=noninteractive apt-get install -yq wget gcc g++ openjdk-8-jdk maven python3.8 zlib1g-dev zip git pip -RUN git clone -b dev-docker-builder https://github.com/ray-project/mobius.git +RUN git clone https://github.com/ray-project/mobius.git RUN sh -c "bash mobius/scripts/install-bazel.sh" RUN python3 -m pip install virtualenv RUN python3 -m virtualenv -p python3 py3 From 69695a819f64e5bcd94763f847de02ff91cf9fc4 Mon Sep 17 00:00:00 2001 From: ashione Date: Sat, 6 Apr 2024 23:56:45 +0800 Subject: [PATCH 9/9] dash for title blank line --- README.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.rst b/README.rst index 0c72f099..67c256c2 100644 --- a/README.rst +++ b/README.rst @@ -2,6 +2,10 @@ :target: docs/assets/infinite.svg :alt: mobius + +------------ + + Mobius : Online Machine Learning. ============ @@ -160,6 +164,7 @@ Key Features Build ---------------- +Build from source code : - Build a docker using docker/Dockerfile-env - Execute `scripts/install.sh`