mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00

* Initial integration of webui with ray * Re-organized calling of build-webui in setup.py * Fixed Lint comments on js code * Fixed more lint issues * Fixed various issues * Fixed directory in services.py * Small changes. * Changes to match lint
32 lines
703 B
Bash
Executable file
32 lines
703 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
|
|
|
|
unamestr="$(uname)"
|
|
if [[ "$unamestr" == "Linux" ]]; then
|
|
platform="linux"
|
|
elif [[ "$unamestr" == "Darwin" ]]; then
|
|
platform="macosx"
|
|
else
|
|
echo "Unrecognized platform."
|
|
exit 1
|
|
fi
|
|
|
|
WEBUI_DIR="$ROOT_DIR/webui"
|
|
|
|
PYTHON_DIR="$ROOT_DIR/lib/python"
|
|
PYTHON_WEBUI_DIR="$PYTHON_DIR/webui"
|
|
|
|
pushd "$WEBUI_DIR"
|
|
npm install
|
|
if [[ $platform == "linux" ]]; then
|
|
nodejs ./node_modules/.bin/webpack -g
|
|
elif [[ $platform == "macosx" ]]; then
|
|
node ./node_modules/.bin/webpack -g
|
|
fi
|
|
pushd node_modules
|
|
rm -rf react* babel* classnames dom-helpers jsesc webpack .bin
|
|
popd
|
|
popd
|
|
|
|
cp -r $WEBUI_DIR/* $PYTHON_WEBUI_DIR/
|