remove modelscope

This commit is contained in:
朱潮 2025-11-18 19:34:30 +08:00
parent ae1560ad22
commit 3e0b46ecbf

View File

@ -32,7 +32,7 @@ COPY requirements.txt .
RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt
# 安装modelscope # 安装modelscope
RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ modelscope #RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ modelscope
# 创建必要的目录 # 创建必要的目录
RUN mkdir -p /app/projects RUN mkdir -p /app/projects
@ -40,7 +40,7 @@ RUN mkdir -p /app/public
RUN mkdir -p /app/models RUN mkdir -p /app/models
# 从modelscope下载sentence-transformers模型到models目录 # 从modelscope下载sentence-transformers模型到models目录
RUN python -c "from modelscope import snapshot_download; model_dir = snapshot_download('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2'); import shutil; shutil.move(model_dir, '/app/models/paraphrase-multilingual-MiniLM-L12-v2')" #RUN python -c "from modelscope import snapshot_download; model_dir = snapshot_download('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2'); import shutil; shutil.move(model_dir, '/app/models/paraphrase-multilingual-MiniLM-L12-v2')"
# 复制应用代码 # 复制应用代码
COPY . . COPY . .