代码拉取完成,页面将自动刷新
set -e
source $CONDA_PREFIX/etc/profile.d/conda.sh
# input target dir with shell script argument
if [ -n "$1" ]; then
TARGET_DIR=$1
else
# Error
echo "Please input a target dir with shell script argument"
exit 1
fi
mkdir -p $TARGET_DIR
conda remove -n devchat-no-binary --all --yes
conda create -n devchat-no-binary python=3.8 -y
conda activate devchat-no-binary
SITE_PACKAGES=$(python -c "import site; print(site.getsitepackages()[0])")
OLD_FOLDERS=$(mktemp)
ls $SITE_PACKAGES > "$OLD_FOLDERS"
pip install --no-binary :all: "pydantic<2"
pip install charset-normalizer --no-binary :all:
pip install git+https://github.com/yangbobo2021/tiktoken.git
pip install .
NEW_FOLDERS=$(mktemp)
ls $SITE_PACKAGES > "$NEW_FOLDERS"
ADDED_FOLDERS=$(comm -13 "$OLD_FOLDERS" "$NEW_FOLDERS")
for folder in $ADDED_FOLDERS; do
cp -r "$SITE_PACKAGES/$folder" "$TARGET_DIR"
done
rm "$OLD_FOLDERS" "$NEW_FOLDERS"
NETWORKX_ATLAS="$TARGET_DIR/networkx/generators/atlas.py"
sed -i '' 's|importlib\.resources|importlib_resources|' "$NETWORKX_ATLAS"
echo "DevChat packages have installed to $TARGET_DIR"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。