chore: import upstream snapshot with attribution
Build / build (push) Has been cancelled
Tests / test (push) Has been cancelled
Build site and push to gh-pages / Build site (push) Has been cancelled
Linter / lint (push) Has been cancelled
Security / dependency-review (push) Has been cancelled
Security / npm-audit (push) Has been cancelled
Security / codeql (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 12:42:51 +08:00
commit f73e710e38
276 changed files with 36598 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
set -euxo pipefail
export PYTHONPATH=$PWD/python
cd docs && make html && cd ..
cd site && jekyll b && cd ..
rm -rf site/_site/docs
cp -r docs/_build/html site/_site/docs
git fetch
git checkout -B gh-pages origin/gh-pages
rm -rf docs .gitignore
mkdir -p docs
cp -rf site/_site/* docs
touch docs/.nojekyll
echo "webllm.mlc.ai" >> docs/CNAME
DATE=`date`
git add docs && git commit -am "Build at ${DATE}"
git push origin gh-pages
git checkout main && git submodule update
echo "Finish deployment at ${DATE}"
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
set -euxo pipefail
cd examples/simple-chat
rm -rf lib
npm run build
cd ../..
cp examples/simple-chat/lib/* site
cd site && jekyll serve --host localhost --port 8888
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
# This file prepares all the necessary dependencies for the web build.
set -euxo pipefail
emcc --version
npm --version
TVM_SOURCE_DIR_SET="${TVM_SOURCE_DIR:-}"
if [[ -z ${TVM_SOURCE_DIR_SET} ]]; then
if [[ ! -d "3rdparty/tvm-unity" ]]; then
echo "Do not find TVM_SOURCE_DIR env variable, cloning a version as source".
git clone https://github.com/mlc-ai/relax 3rdparty/tvm-unity --recursive
fi
export TVM_SOURCE_DIR="${TVM_SOURCE_DIR:-3rdparty/tvm-unity}"
fi
cd ${TVM_SOURCE_DIR}/web && make && npm install && npm run build && cd -
rm -rf tvm_home
ln -s ${TVM_SOURCE_DIR} tvm_home
npm install
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
# This file prepares all the necessary dependencies for the web build.
set -euxo pipefail
npm --version
MLC_LLM_HOME_SET="${MLC_LLM_HOME:-}"
if [[ -z ${MLC_LLM_HOME_SET} ]]; then
echo "Do not find MLC_LLM_HOME env variable, need to set this to work".
fi
cd ${MLC_LLM_HOME}/dist
echo "Serving ${MLC_LLM_HOME}/dist for local debugging purposes"
npx http-server -p 8000 --cors
cd -