Skip to content

Commit 5a8a327

Browse files
committed
Use local MONAI App Sdk module when packaging
The functionaly was removed by #199. This patch revert it.
1 parent 47625db commit 5a8a327

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

monai/deploy/packager/templates.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
COMMON_FOOTPRINT = """
1313
USER root
1414
15-
RUN pip install --no-cache-dir --upgrade setuptools==57.4.0 pip==21.2.4 wheel==0.37.0 numpy>=1.21
15+
RUN pip install --no-cache-dir --upgrade setuptools==57.4.0 pip==21.3.1 wheel==0.37.0 numpy>=1.21
1616
1717
RUN mkdir -p /etc/monai/ \\
1818
&& mkdir -p /opt/monai/ \\
@@ -34,9 +34,17 @@
3434
&& rm -rf {executor_dir}/executor_pkg \\
3535
&& chmod +x {executor_dir}/monai-exec
3636
37-
ENV PATH=/home/root/.local/bin:$PATH
37+
ENV PATH=/root/.local/bin:$PATH
3838
39-
RUN pip install --no-cache-dir -r {map_requirements_path}
39+
RUN pip install --no-cache-dir --user -r {map_requirements_path}
40+
41+
# Override monai-deploy-app-sdk module
42+
COPY ./monai-deploy-app-sdk /root/.local/lib/python3.8/site-packages/monai/deploy/
43+
RUN echo "User site package location: $(python3 -m site --user-site)" \\
44+
&& [ "$(python3 -m site --user-site)" != "/root/.local/lib/python3.8/site-packages" ] \\
45+
&& mkdir -p $(python3 -m site --user-site)/monai/deploy \\
46+
&& cp -r /root/.local/lib/python3.8/site-packages/monai/deploy/* $(python3 -m site --user-site)/monai/deploy/ \\
47+
|| true
4048
4149
COPY ./map/app.json /etc/monai/
4250
COPY ./map/pkg.json /etc/monai/

0 commit comments

Comments
 (0)