Build dashboard only once in the wheel build and make sure caching is working for wheel builds (#5784)

* build dashboard only once

* update

* debug

* caching?

* update

* update
This commit is contained in:
Philipp Moritz
2019-10-02 16:29:11 -07:00
committed by GitHub
parent 4e049232a8
commit 9a71d6ce3a
2 changed files with 16 additions and 19 deletions
+7 -9
View File
@@ -42,6 +42,12 @@ mkdir -p .whl
source $HOME/.nvm/nvm.sh
nvm use node
# Build the dashboard so its static assets can be included in the wheel.
pushd python/ray/dashboard/client
npm ci
npm run build
popd
for ((i=0; i<${#PY_VERSIONS[@]}; ++i)); do
PY_VERSION=${PY_VERSIONS[i]}
PY_INST=${PY_INSTS[i]}
@@ -51,7 +57,7 @@ for ((i=0; i<${#PY_VERSIONS[@]}; ++i)); do
# The -f flag is passed twice to also run git clean in the arrow subdirectory.
# The -d flag removes directories. The -x flag ignores the .gitignore file,
# and the -e flag ensures that we don't remove the .whl directory.
git clean -f -f -x -d -e .whl -e $DOWNLOAD_DIR
git clean -f -f -x -d -e .whl -e $DOWNLOAD_DIR -e python/ray/dashboard/client
# Install Python.
INST_PATH=python_downloads/$PY_INST
@@ -66,12 +72,6 @@ for ((i=0; i<${#PY_VERSIONS[@]}; ++i)); do
curl https://bootstrap.pypa.io/get-pip.py | $PYTHON_EXE
popd
# Build the dashboard so its static assets can be included in the wheel.
pushd python/ray/dashboard/client
npm ci
npm run build
popd
pushd python
# Setuptools on CentOS is too old to install arrow 0.9.0, therefore we upgrade.
$PIP_CMD install --upgrade setuptools
@@ -89,5 +89,3 @@ for ((i=0; i<${#PY_VERSIONS[@]}; ++i)); do
mv dist/*.whl ../.whl/
popd
done
git clean -f -f -x -d -e .whl -e $DOWNLOAD_DIR
+9 -10
View File
@@ -41,6 +41,12 @@ source $HOME/.nvm/nvm.sh
nvm install node
nvm use node
# Build the dashboard so its static assets can be included in the wheel.
pushd python/ray/dashboard/client
npm ci
npm run build
popd
mkdir .whl
for ((i=0; i<${#PYTHONS[@]}; ++i)); do
PYTHON=${PYTHONS[i]}
@@ -48,14 +54,9 @@ for ((i=0; i<${#PYTHONS[@]}; ++i)); do
# The -f flag is passed twice to also run git clean in the arrow subdirectory.
# The -d flag removes directories. The -x flag ignores the .gitignore file,
# and the -e flag ensures that we don't remove the .whl directory.
git clean -f -f -x -d -e .whl
# Build the dashboard so its static assets can be included in the wheel.
pushd python/ray/dashboard/client
npm ci
npm run build
popd
# and the -e flag ensures that we don't remove the .whl directory and the
# dashboard directory.
git clean -f -f -x -d -e .whl -e python/ray/dashboard/client
pushd python
# Fix the numpy version because this will be the oldest numpy version we can
@@ -67,8 +68,6 @@ for ((i=0; i<${#PYTHONS[@]}; ++i)); do
popd
done
git clean -f -f -x -d -e .whl
# Rename the wheels so that they can be uploaded to PyPI. TODO(rkn): This is a
# hack, we should use auditwheel instead.
pushd .whl