docs: fix vercel build script (#19090)

amazon linux 2023 doesn't have `amazon-linux-extras` but shoudl have python3.9 by default
This commit is contained in:
Bagatur 2024-03-14 13:53:43 -07:00 committed by GitHub
parent d4b025c812
commit e276817e1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,7 +2,6 @@
yum -y update yum -y update
yum install gcc bzip2-devel libffi-devel zlib-devel wget tar gzip -y yum install gcc bzip2-devel libffi-devel zlib-devel wget tar gzip -y
amazon-linux-extras install python3.8 -y
# install quarto # install quarto
wget -q https://github.com/quarto-dev/quarto-cli/releases/download/v1.3.450/quarto-1.3.450-linux-amd64.tar.gz wget -q https://github.com/quarto-dev/quarto-cli/releases/download/v1.3.450/quarto-1.3.450-linux-amd64.tar.gz
@ -11,26 +10,26 @@ export PATH=$PATH:$(pwd)/quarto-1.3.450/bin/
# setup python env # setup python env
python3.8 -m venv .venv python3 -m venv .venv
source .venv/bin/activate source .venv/bin/activate
python3.8 -m pip install --upgrade pip python3 -m pip install --upgrade pip
python3.8 -m pip install -r vercel_requirements.txt python3 -m pip install -r vercel_requirements.txt
# autogenerate integrations tables # autogenerate integrations tables
python3.8 scripts/model_feat_table.py python3 scripts/model_feat_table.py
# copy in external files # copy in external files
mkdir docs/templates mkdir docs/templates
cp ../templates/docs/INDEX.md docs/templates/index.md cp ../templates/docs/INDEX.md docs/templates/index.md
python3.8 scripts/copy_templates.py python3 scripts/copy_templates.py
cp ../cookbook/README.md src/pages/cookbook.mdx cp ../cookbook/README.md src/pages/cookbook.mdx
wget -q https://raw.githubusercontent.com/langchain-ai/langserve/main/README.md -O docs/langserve.md wget -q https://raw.githubusercontent.com/langchain-ai/langserve/main/README.md -O docs/langserve.md
python3.8 scripts/resolve_local_links.py docs/langserve.md https://github.com/langchain-ai/langserve/tree/main/ python3 scripts/resolve_local_links.py docs/langserve.md https://github.com/langchain-ai/langserve/tree/main/
wget -q https://raw.githubusercontent.com/langchain-ai/langgraph/main/README.md -O docs/langgraph.md wget -q https://raw.githubusercontent.com/langchain-ai/langgraph/main/README.md -O docs/langgraph.md
python3.8 scripts/resolve_local_links.py docs/langgraph.md https://github.com/langchain-ai/langgraph/tree/main/ python3 scripts/resolve_local_links.py docs/langgraph.md https://github.com/langchain-ai/langgraph/tree/main/
# render # render
quarto render docs/ quarto render docs/