1 Star 0 Fork 11

chow/Ray

forked from Gitee 极速下载/Ray 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build-docker.sh 1.53 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
set -x
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
--no-cache)
NO_CACHE="--no-cache"
;;
--skip-examples)
SKIP_EXAMPLES=YES
;;
--output-sha)
# output the SHA sum of the last built file (either ray-project/deploy
# or ray-project/examples, suppressing all other output. This is useful
# for scripting tests, especially when builds of different versions
# are running on the same machine. It also can facilitate cleanup.
OUTPUT_SHA=YES
;;
*)
echo "Usage: build-docker.sh [ --no-cache ] [ --skip-examples ] [ --sha-sums ]"
exit 1
esac
shift
done
# Build base dependencies, allow caching
if [ $OUTPUT_SHA ]; then
IMAGE_SHA=$(docker build $NO_CACHE -q -t ray-project/base-deps docker/base-deps)
else
docker build $NO_CACHE -t ray-project/base-deps docker/base-deps
fi
# Build the current Ray source
git rev-parse HEAD > ./docker/deploy/git-rev
git archive -o ./docker/deploy/ray.tar "$(git rev-parse HEAD)"
if [ $OUTPUT_SHA ]; then
IMAGE_SHA=$(docker build --no-cache -q -t ray-project/deploy docker/deploy)
else
docker build --no-cache -t ray-project/deploy docker/deploy
fi
rm ./docker/deploy/ray.tar ./docker/deploy/git-rev
# Build the examples, unless skipped
if [ ! $SKIP_EXAMPLES ]; then
if [ $OUTPUT_SHA ]; then
IMAGE_SHA=$(docker build $NO_CACHE -q -t ray-project/examples docker/examples)
else
docker build --no-cache -t ray-project/examples docker/examples
fi
fi
if [ $OUTPUT_SHA ]; then
echo "$IMAGE_SHA" | sed 's/sha256://'
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/chower/Ray.git
git@gitee.com:chower/Ray.git
chower
Ray
Ray
master

搜索帮助