mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-16 22:51:24 +00:00
feat(model): Support database model registry (#1656)
This commit is contained in:
@@ -34,15 +34,16 @@ RUN pip3 install --upgrade pip -i $PIP_INDEX_URL \
|
||||
# install openai for proxyllm
|
||||
&& pip3 install -i $PIP_INDEX_URL ".[openai]"
|
||||
|
||||
RUN (if [ "${LANGUAGE}" = "zh" ]; \
|
||||
# language is zh, download zh_core_web_sm from github
|
||||
then wget https://github.com/explosion/spacy-models/releases/download/zh_core_web_sm-3.7.0/zh_core_web_sm-3.7.0-py3-none-any.whl -O /tmp/zh_core_web_sm-3.7.0-py3-none-any.whl \
|
||||
&& pip3 install /tmp/zh_core_web_sm-3.7.0-py3-none-any.whl -i $PIP_INDEX_URL \
|
||||
&& rm /tmp/zh_core_web_sm-3.7.0-py3-none-any.whl; \
|
||||
# not zh, download directly
|
||||
else python3 -m spacy download zh_core_web_sm; \
|
||||
fi;) \
|
||||
&& rm -rf `pip3 cache dir`
|
||||
# Not install spacy model for now
|
||||
#RUN (if [ "${LANGUAGE}" = "zh" ]; \
|
||||
# # language is zh, download zh_core_web_sm from github
|
||||
# then wget https://github.com/explosion/spacy-models/releases/download/zh_core_web_sm-3.7.0/zh_core_web_sm-3.7.0-py3-none-any.whl -O /tmp/zh_core_web_sm-3.7.0-py3-none-any.whl \
|
||||
# && pip3 install /tmp/zh_core_web_sm-3.7.0-py3-none-any.whl -i $PIP_INDEX_URL \
|
||||
# && rm /tmp/zh_core_web_sm-3.7.0-py3-none-any.whl; \
|
||||
# # not zh, download directly
|
||||
# else python3 -m spacy download zh_core_web_sm; \
|
||||
# fi;) \
|
||||
# && rm -rf `pip3 cache dir`
|
||||
|
||||
ARG BUILD_LOCAL_CODE="false"
|
||||
# COPY the rest of the app
|
||||
|
17
docker/base/build_proxy_image.sh
Executable file
17
docker/base/build_proxy_image.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPT_LOCATION=$0
|
||||
cd "$(dirname "$SCRIPT_LOCATION")"
|
||||
WORK_DIR=$(pwd)
|
||||
|
||||
if [[ " $* " == *" --help "* ]] || [[ " $* " == *" -h "* ]]; then
|
||||
bash $WORK_DIR/build_image.sh "$@"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
bash $WORK_DIR/build_image.sh --install-mode openai "$@"
|
||||
|
||||
if [ 0 -ne $? ]; then
|
||||
echo "Error: build base image failed"
|
||||
exit 1
|
||||
fi
|
Reference in New Issue
Block a user