-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding instructions on how to build Gradio-Lite locally (#6870)
* changes * Fix scripts/launch_lite.sh removing the unnecessary execution of `python -m http.server` * Add an exec permission to scripts/launch_lite.sh (`chmod +x`) * Update launch_lite.sh to run the pybuild command when necessary * Update CONTRIBUTING.md * Fix scripts/build_lite.sh * rename * Update CONTRIBUTING.md * Update scripts/run_lite.sh --------- Co-authored-by: Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com>
- Loading branch information
Showing
4 changed files
with
80 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash -eu | ||
|
||
cd "$(dirname ${0})/.." | ||
source scripts/helpers.sh | ||
|
||
pnpm_required | ||
|
||
pnpm --filter @gradio/app build:lite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash -eu | ||
|
||
ROOTDIR=$(realpath $(dirname ${0})/..) | ||
|
||
cd "${ROOTDIR}" | ||
source scripts/helpers.sh | ||
|
||
pnpm_required | ||
jq_required | ||
|
||
GRADIO_VERSION=$(jq -r .version ${ROOTDIR}/gradio/package.json) | ||
GRADIO_CLIENT_VERSION=$(jq -r .version ${ROOTDIR}/client/python/gradio_client/package.json) | ||
GRADIO_WHEEL_PATH="${ROOTDIR}/dist/gradio-${GRADIO_VERSION}-py3-none-any.whl" | ||
GRADIO_CLIENT_FILE_PATH="${ROOTDIR}/client/python/dist/gradio_client-${GRADIO_CLIENT_VERSION}-py3-none-any.whl" | ||
|
||
echo "Checking for gradio and gradio_client wheel files..." | ||
echo "GRADIO_WHEEL_PATH: ${GRADIO_WHEEL_PATH}" | ||
echo "GRADIO_CLIENT_FILE_PATH: ${GRADIO_CLIENT_FILE_PATH}" | ||
|
||
if [ -f "${GRADIO_WHEEL_PATH}" ] && [ -f "${GRADIO_CLIENT_FILE_PATH}" ]; then | ||
echo "Found gradio and gradio_client wheel files..." | ||
else | ||
echo "Building gradio and gradio_client wheel files..." | ||
pnpm --filter @gradio/app pybuild | ||
fi | ||
|
||
pnpm --filter @gradio/client build | ||
|
||
pnpm --filter @gradio/app dev:lite |