File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 5
5
inputs :
6
6
dockerImageTag :
7
7
description : ' Docker Image Tag'
8
- default : ' v2.0.1 '
8
+ default : ' v2.0.2 '
9
9
required : true
10
10
architecture :
11
11
description : ' Architecture'
Original file line number Diff line number Diff line change 10
10
11
11
# 不知道为什么用上面的脚本重新拉一遍向量模型比之前的大很多,所以还是用下面的脚本复用原来已经构建好的向量模型
12
12
13
+ FROM python:3.11-slim-bookworm AS tmp-stage1
14
+ COPY installer/install_model_token.py install_model_token.py
15
+ RUN pip3 install --upgrade pip setuptools && \
16
+ pip install pycrawlers && \
17
+ pip install transformers && \
18
+ python3 install_model_token.py && \
19
+ cp -r model/base/hub model/tokenizer
20
+
13
21
FROM ghcr.io/1panel-dev/maxkb-vector-model:v1.0.1 AS vector-model
14
22
15
- FROM alpine AS tmp-stage
23
+ FROM alpine AS tmp-stage2
16
24
COPY --from=vector-model /opt/maxkb/app/model /opt/maxkb-app/model
17
25
COPY --from=vector-model /opt/maxkb/app/model/base/hub /opt/maxkb-app/model/tokenizer
26
+ COPY --from=tmp-stage1 model/tokenizer /opt/maxkb-app/model/tokenizer
18
27
RUN rm -rf /opt/maxkb-app/model/embedding/shibing624_text2vec-base-chinese/onnx
19
28
29
+
30
+
20
31
FROM scratch
21
- COPY --from=tmp-stage /opt/maxkb-app/model /opt/maxkb-app/model
32
+ COPY --from=tmp-stage2 /opt/maxkb-app/model /opt/maxkb-app/model
You can’t perform that action at this time.
0 commit comments