Skip to content

Commit 8cab7d6

Browse files
committed
feat: add operator-packages-volume to docker-compose and update Dockerfile for site-packages path
1 parent 8113840 commit 8cab7d6

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

deployment/docker/datamate/docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ services:
9090
- dataset_volume:/dataset
9191
- flow_volume:/flow
9292
- operator-runtime-volume:/opt/runtime/datamate/ops/user
93+
- operator-packages-volume:/usr/local/lib/ops/site-packages
9394
networks: [ datamate ]
9495

9596
# 4) mineru
@@ -150,6 +151,8 @@ volumes:
150151
name: datamate-operator-upload-volume
151152
operator-runtime-volume:
152153
name: datamate-operator-runtime-volume
154+
operator-packages-volume:
155+
name: datamate-operator-packages-volume
153156
mineru_log_volume:
154157
name: datamate-mineru_log_volume
155158

deployment/helm/datamate/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ runtime:
170170
- mountPath: /opt/runtime/datamate/ops/user
171171
name: operator-volume
172172
subPath: extract
173+
- mountPath: /usr/local/lib/ops/site-packages
174+
name: operator-volume
175+
subPath: site-packages
173176

174177
ray-cluster:
175178
enabled: true
@@ -214,6 +217,9 @@ ray-cluster:
214217
- mountPath: /opt/runtime/datamate/ops/user
215218
name: operator-volume
216219
subPath: extract
220+
- mountPath: /usr/local/lib/ops/site-packages
221+
name: operator-volume
222+
subPath: site-packages
217223
sidecarContainers:
218224
- name: runtime
219225
image: datamate-runtime
@@ -262,3 +268,6 @@ ray-cluster:
262268
- mountPath: /opt/runtime/datamate/ops/user
263269
name: operator-volume
264270
subPath: extract
271+
- mountPath: /usr/local/lib/ops/site-packages
272+
name: operator-volume
273+
subPath: site-packages

scripts/images/runtime/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ RUN --mount=type=cache,target=/root/.cache/uv \
2323
UV_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" uv pip install -e . --system --index-strategy unsafe-best-match \
2424
&& UV_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu" uv pip install -r /opt/runtime/datamate/ops/pyproject.toml --system \
2525
&& uv pip uninstall torch torchvision --system \
26-
&& python -m spacy download zh_core_web_sm
26+
&& python -m spacy download zh_core_web_sm \
27+
&& echo "/usr/local/lib/ops/site-packages" > /usr/local/lib/python3.11/site-packages/ops.pth
2728

2829
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
2930
&& chmod +x /opt/runtime/start.sh \

0 commit comments

Comments
 (0)