Skip to content

Commit

Permalink
fix dockerfile entrypoint (#123)
Browse files Browse the repository at this point in the history
* fix dockerfile entrypoint

* fix model docker
  • Loading branch information
cyjseagull authored Dec 12, 2024
1 parent 64e2bbb commit 1faafa8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
3 changes: 2 additions & 1 deletion cpp/wedpr-transport/sdk-wrapper/python/bindings/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include CHANGELOG.md
include *requirements.txt
include ./wedpr_python_gateway_sdk/libs/libwedpr_python_transport*
include wedpr_python_gateway_sdk/libs/libwedpr_python_transport.dylib
include wedpr_python_gateway_sdk/libs/libwedpr_python_transport.so
2 changes: 1 addition & 1 deletion cpp/wedpr-transport/sdk-wrapper/python/bindings/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def run(self):
setup_args = dict(
name='wedpr-python-gateway-sdk',
packages=find_packages(),
version="3.0.0-20241018",
version="3.0.0-20241019",
description="wedpr-python-gateway-sdk: The gateway sdk for WeDPR",
long_description_content_type="text/markdown",
author="WeDPR Development Team",
Expand Down
20 changes: 9 additions & 11 deletions docker-files/cpp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ RUN apt-get -q update && apt-get install -qy --no-install-recommends vim \
&& dpkg-reconfigure --frontend noninteractive tzdata \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /data/home/wedpr/wedpr-gateway-service
COPY --from=builder /WeDPR-Component/cpp/build/bin/ppc-gateway-service /usr/local/bin/ppc-gateway-service

COPY --from=builder /WeDPR-Component/cpp/build/bin/ppc-gateway-service /data/home/wedpr/wedpr-gateway-service/ppc-gateway-service

ENTRYPOINT ["/data/home/wedpr/wedpr-gateway-service/ppc-gateway-service", "-c", "config.ini"]
ENTRYPOINT ["/usr/local/bin/ppc-gateway-service"]
CMD ["--version"]

FROM ubuntu:22.04 as wedpr-pro-node-service
LABEL [email protected]
Expand All @@ -60,11 +59,10 @@ RUN apt-get -q update && apt-get install -qy --no-install-recommends vim libkrb5
&& dpkg-reconfigure --frontend noninteractive tzdata \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /data/home/wedpr/wedpr-pro-node-service

COPY --from=builder /WeDPR-Component/cpp/build/bin/ppc-pro-node /data/home/wedpr/wedpr-pro-node-service/ppc-pro-node
COPY --from=builder /WeDPR-Component/cpp/build/bin/ppc-pro-node /usr/local/bin/ppc-pro-node

ENTRYPOINT ["/data/home/wedpr/wedpr-pro-node-service/ppc-pro-node", "-c", "config.ini"]
ENTRYPOINT ["/usr/local/bin/ppc-pro-node"]
CMD ["--version"]

FROM fiscoorg/wedpr-mpc-base-ubuntu:v3.0.0 as wedpr-mpc-service
LABEL [email protected]
Expand All @@ -75,8 +73,8 @@ RUN apt-get -q update && apt-get install -qy --no-install-recommends vim libkrb5
&& dpkg-reconfigure --frontend noninteractive tzdata \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /data/home/wedpr/wedpr-mpc-service

COPY --from=builder /WeDPR-Component/cpp/build/bin/wedpr-mpc /data/home/wedpr/wedpr-mpc-service/wedpr-mpc
COPY --from=builder /WeDPR-Component/cpp/build/bin/wedpr-mpc /usr/local/bin/wedpr-mpc

ENTRYPOINT ["/data/home/wedpr/wedpr-mpc-service/wedpr-mpc", "-c", "config.ini"]
ENTRYPOINT ["/usr/local/bin/wedpr-mpc"]
CMD ["--version"]
4 changes: 2 additions & 2 deletions docker-files/model/model/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ENV DEBIAN_FRONTEND=noninteractive \

# install the gateway sdk
# TODO: replace with pypip
RUN pip install -i https://test.pypi.org/simple/ wedpr-python-gateway-sdk
RUN pip install --no-cache-dir -i https://test.pypi.org/simple/ wedpr-python-gateway-sdk

# obtain the source, no need to fetch the submodule(vcpkg) here
RUN git clone https://github.com/WeBankBlockchain/WeDPR-Component.git -b ${SOURCE}
Expand All @@ -26,4 +26,4 @@ RUN mkdir -p /data/home/wedpr/wedpr-model/ \
# clear the WeDPR-Component
RUN rm -rf /data/home/wedpr/WeDPR-Component

ENTRYPOINT ["/bin/bash", "/data/home/wedpr/wedpr-model/start.sh", "true"]
ENTRYPOINT ["python", "-u", "/data/home/wedpr/wedpr-model/ppc_model/ppc_model_app.py"]

0 comments on commit 1faafa8

Please sign in to comment.