-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nbdoc -> quarto #14156
nbdoc -> quarto #14156
Changes from 12 commits
477cc2b
ad5c74b
bdc4960
5b9fd45
65f4594
22d8b7b
807c484
cac1279
6ae1fff
781b5b1
b449e55
9a4654a
fa46833
14463f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,25 @@ | ||
#!/bin/bash | ||
|
||
version_compare() { | ||
local v1=(${1//./ }) | ||
local v2=(${2//./ }) | ||
for i in {0..2}; do | ||
if (( ${v1[i]} < ${v2[i]} )); then | ||
return 1 | ||
fi | ||
done | ||
return 0 | ||
} | ||
yum -y update | ||
yum install gcc bzip2-devel libffi-devel zlib-devel wget tar gzip -y | ||
amazon-linux-extras install python3.8 -y | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. python3.8 is available in amazon linux, and is much faster to install There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice. ya was only required previously for some other functionality, now not used. Is python 3.8 installation even required at this point |
||
|
||
openssl_version=$(openssl version | awk '{print $2}') | ||
required_openssl_version="1.1.1" | ||
# install quarto | ||
wget -q https://github.com/quarto-dev/quarto-cli/releases/download/v1.3.450/quarto-1.3.450-linux-amd64.tar.gz | ||
tar -xzf quarto-1.3.450-linux-amd64.tar.gz | ||
export PATH=$PATH:$(pwd)/quarto-1.3.450/bin/ | ||
|
||
python_version=$(python3 --version 2>&1 | awk '{print $2}') | ||
required_python_version="3.10" | ||
|
||
echo "OpenSSL Version" | ||
echo $openssl_version | ||
echo "Python Version" | ||
echo $python_version | ||
# If openssl version is less than 1.1.1 AND python version is less than 3.10 | ||
if ! version_compare $openssl_version $required_openssl_version && ! version_compare $python_version $required_python_version; then | ||
### See: https://github.com/urllib3/urllib3/issues/2168 | ||
# Requests lib breaks for old SSL versions, | ||
# which are defaults on Amazon Linux 2 (which Vercel uses for builds) | ||
yum -y update | ||
yum remove openssl-devel -y | ||
yum install gcc bzip2-devel libffi-devel zlib-devel wget tar -y | ||
yum install openssl11 -y | ||
yum install openssl11-devel -y | ||
|
||
wget https://www.python.org/ftp/python/3.11.4/Python-3.11.4.tgz | ||
tar xzf Python-3.11.4.tgz | ||
cd Python-3.11.4 | ||
./configure | ||
make altinstall | ||
echo "Python Version" | ||
python3.11 --version | ||
cd .. | ||
fi | ||
Comment on lines
-25
to
-43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. openssl only took a second to install, but the custom python install took more than 3 minutes |
||
|
||
python3.11 -m venv .venv | ||
python3.8 -m venv .venv | ||
source .venv/bin/activate | ||
python3.11 -m pip install --upgrade pip | ||
python3.11 -m pip install -r vercel_requirements.txt | ||
python3.11 scripts/model_feat_table.py | ||
python3.8 -m pip install --upgrade pip | ||
python3.8 -m pip install -r vercel_requirements.txt | ||
python3.8 scripts/model_feat_table.py | ||
mkdir docs/templates | ||
cp ../templates/docs/INDEX.md docs/templates/index.md | ||
python3.11 scripts/copy_templates.py | ||
python3.8 scripts/copy_templates.py | ||
cp ../cookbook/README.md src/pages/cookbook.mdx | ||
cp ../.github/CONTRIBUTING.md docs/contributing.md | ||
wget https://raw.githubusercontent.com/langchain-ai/langserve/main/README.md -O docs/langserve.md | ||
nbdoc_build --srcdir docs --pause 0 | ||
python3.11 scripts/generate_api_reference_links.py | ||
wget -q https://raw.githubusercontent.com/langchain-ai/langserve/main/README.md -O docs/langserve.md | ||
quarto render docs/ | ||
python3.8 scripts/generate_api_reference_links.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hinthornw would love your eyes on this. Everything seems to work, but cuts a lot of the deps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya seems fine. The 3.11 stuff was only to generate the API refs, which we seem to not be doing anymore anyhow