diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml index 199db30..ae6dfeb 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/build-docker-images.yml @@ -5,7 +5,7 @@ on: tags-ignore: - '*.*' branches: - - master + - main pull_request: jobs: diff --git a/.staroid/build.sh b/.staroid/build.sh index c459f74..51178f8 100755 --- a/.staroid/build.sh +++ b/.staroid/build.sh @@ -3,12 +3,19 @@ # https://skaffold.dev/docs/pipeline-stages/builders/custom/ # +# sed +SED_INPLACE="sed -i" +uname | grep Darwin > /dev/null +if [ $? -eq 0 ]; then + SED_INPLACE="sed -i .bak" +fi + set -x set -e pwd RAY_REPO=https://github.com/ray-project/ray.git -RAY_CHECKOUT=260b07cf0cf2c10c091711cc3d598663133c2dc5 +RAY_CHECKOUT=5fc761c562006432ed6fd43066ba3d3c7b9c6ac5 PYTHON_VERSION=$1 SHORT_VER=`echo $PYTHON_VERSION | sed "s/\([0-9]*\)[.]\([0-9]*\)[.][0-9]*/\1\2/g"` @@ -61,12 +68,12 @@ if [ "$BUILD_WHEEL" == "true" ]; then WHEEL=`ls .whl/*-cp$SHORT_VER-*` else - if [ "$SHORT_VER" == "36" ]; then - WHEEL="https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-1.1.0.dev0-cp36-cp36m-manylinux1_x86_64.whl" + if [ "$SHORT_VER" == "36" ]; then + WHEEL="https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-2.0.0.dev0-cp36-cp36m-manylinux2014_x86_64.whl" elif [ "$SHORT_VER" == "37" ]; then - WHEEL="https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-1.1.0.dev0-cp37-cp37m-manylinux1_x86_64.whl" + WHEEL="https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-2.0.0.dev0-cp37-cp37m-manylinux2014_x86_64.whl" elif [ "$SHORT_VER" == "38" ]; then - WHEEL="https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-1.1.0.dev0-cp38-cp38-manylinux1_x86_64.whl" + WHEEL="https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-2.0.0.dev0-cp38-cp38-manylinux2014_x86_64.whl" fi fi @@ -75,8 +82,15 @@ fi ../.staroid/ray_patch.sh patch . $WHEEL # apply additional docker file commands +if [ "$SHORT_VER" == "36" ] && [ "$GITHUB_ACTIONS" == "true" ]; then + # when github action runs python36 build, it stops with no space left error during installing conda install tensorflow-gpu + # so in this case, we skip install tensorflow-gpu package install + $SED_INPLACE "/tensorflow/d" ../.staroid/Dockerfile_staroid +fi + cat ../.staroid/Dockerfile_staroid >> docker/ray-ml/Dockerfile + # print patched files git diff @@ -86,7 +100,7 @@ cat docker/ray/Dockerfile cat docker/ray-ml/Dockerfile # cp requirements to ray-ml dir -cp python/requirements* docker/ray-ml +cp python/requirements.txt python/requirements_* python/requirements/* docker/ray-ml # build docker image ./build-docker.sh --no-cache-build --gpu --python-version $PYTHON_VERSION diff --git a/.staroid/ray_patch.sh b/.staroid/ray_patch.sh index 100ab34..2eed0ce 100755 --- a/.staroid/ray_patch.sh +++ b/.staroid/ray_patch.sh @@ -61,7 +61,7 @@ if [ "$OP" == "patch" ]; then $SED_INPLACE "/tensorflow/d" ${RAY_HOME}/python/requirements.txt $SED_INPLACE "/tensorflow/d" ${RAY_HOME}/python/requirements_ml_docker.txt $SED_INPLACE "/tensorflow/d" ${RAY_HOME}/python/requirements_rllib.txt - $SED_INPLACE "/tensorflow/d" ${RAY_HOME}/python/requirements_tune.txt + $SED_INPLACE "/tensorflow/d" ${RAY_HOME}/python/requirements/requirements_tune.txt elif [ "$OP" == "reset" ]; then git checkout ${RAY_HOME}/docker/ray/Dockerfile @@ -73,7 +73,7 @@ elif [ "$OP" == "reset" ]; then git checkout ${RAY_HOME}/python/requirements.txt git checkout ${RAY_HOME}/python/requirements_ml_docker.txt git checkout ${RAY_HOME}/python/requirements_rllib.txt - git checkout ${RAY_HOME}/python/requirements_tune.txt + git checkout ${RAY_HOME}/python/requirements/requirements_tune.txt else echo "Invalid operation $OP" exit 1