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

[CI/CD]add docker dev builder #64

Merged
merged 9 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
:target: docs/assets/infinite.svg
:alt: mobius


------------


Mobius : Online Machine Learning.
============

`Mobius <https://tech.antfin.com/products/ARCMOBIUS>`_ is an AI infra platform including realtime computing and training.

.. image:: https://github.com/ray-project/mobius/workflows/ubuntu-building/badge.svg
Expand All @@ -12,7 +17,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
=============
Expand Down Expand Up @@ -156,6 +161,13 @@ 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 from source code :
- Build a docker using docker/Dockerfile-env
- Execute `scripts/install.sh`


Getting Involved
----------------
Expand Down
10 changes: 10 additions & 0 deletions docker/Dockerfile-dev
Original file line number Diff line number Diff line change
@@ -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 DEBIAN_FRONTEND=noninteractive 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"
34 changes: 29 additions & 5 deletions scripts/install-bazel.sh
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -22,13 +23,36 @@ case "${OSTYPE}" in
;;
esac
echo "platform is ${platform}"
echo "current arch is $arm"

if [ "${platform}" = "darwin" ]; 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
if [ "${arm}" = "aarch64" ]; then
arm="arm64"
fi

bazel_exe_file=""

if [ "${platform}" = "darwin" ] && [ "${arm}" != "arm64" ]; then
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
cp bazel-5.4.1-darwin-arm64 /usr/bin/bazel
elif [ "${platform}" = "linux" ] && [ "${arm}" = "arm64" ]; then
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
Loading