diff options
author | Guillaume Klein <guillaume.klein@systrangroup.com> | 2019-07-17 15:50:07 +0300 |
---|---|---|
committer | Guillaume Klein <guillaume.klein@systrangroup.com> | 2019-07-17 15:50:07 +0300 |
commit | b28f533b29ce008c392cc536b689f9f82b6b8562 (patch) | |
tree | 00c9e4038a58ee3678af9ae70a4e5200852d7634 | |
parent | 6f5c4562d02f9ea47e04aff55a149d5d3cbdd0eb (diff) |
Move final binaries in /opt instead of /rootv0.16.2
-rw-r--r-- | docker/Dockerfile.centos7 | 10 | ||||
-rw-r--r-- | docker/Dockerfile.centos7-gpu | 10 | ||||
-rw-r--r-- | docker/Dockerfile.ubuntu16 | 10 | ||||
-rwxr-xr-x | docker/build_all.sh | 4 |
4 files changed, 18 insertions, 16 deletions
diff --git a/docker/Dockerfile.centos7 b/docker/Dockerfile.centos7 index f1a2995d..0a62800d 100644 --- a/docker/Dockerfile.centos7 +++ b/docker/Dockerfile.centos7 @@ -74,12 +74,12 @@ RUN cp /opt/intel/lib/intel64/libiomp5.so /root/ctranslate2/lib && \ FROM centos:7 -COPY --from=builder /root/ctranslate2 /root/ctranslate2 +COPY --from=builder /root/ctranslate2 /opt/ctranslate2 RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py && rm get-pip.py -RUN pip --no-cache-dir install /root/ctranslate2/*.whl +RUN pip --no-cache-dir install /opt/ctranslate2/*.whl -WORKDIR /root +WORKDIR /opt -ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/ctranslate2/lib +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ctranslate2/lib -ENTRYPOINT ["/root/ctranslate2/bin/translate"] +ENTRYPOINT ["/opt/ctranslate2/bin/translate"] diff --git a/docker/Dockerfile.centos7-gpu b/docker/Dockerfile.centos7-gpu index 3c86dc49..e2f6e650 100644 --- a/docker/Dockerfile.centos7-gpu +++ b/docker/Dockerfile.centos7-gpu @@ -110,12 +110,12 @@ RUN yum install -y \ cuda-cublas-$CUDA_PKG_VERSION && \ rm -rf /var/cache/yum/* -COPY --from=builder /root/ctranslate2 /root/ctranslate2 +COPY --from=builder /root/ctranslate2 /opt/ctranslate2 RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py && rm get-pip.py -RUN pip --no-cache-dir install /root/ctranslate2/*.whl +RUN pip --no-cache-dir install /opt/ctranslate2/*.whl -WORKDIR /root +WORKDIR /opt -ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/ctranslate2/lib +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ctranslate2/lib -ENTRYPOINT ["/root/ctranslate2/bin/translate"] +ENTRYPOINT ["/opt/ctranslate2/bin/translate"] diff --git a/docker/Dockerfile.ubuntu16 b/docker/Dockerfile.ubuntu16 index 363a6aca..fc13354a 100644 --- a/docker/Dockerfile.ubuntu16 +++ b/docker/Dockerfile.ubuntu16 @@ -86,11 +86,11 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -COPY --from=builder /root/ctranslate2 /root/ctranslate2 -RUN pip --no-cache-dir install /root/ctranslate2/*.whl +COPY --from=builder /root/ctranslate2 /opt/ctranslate2 +RUN pip --no-cache-dir install /opt/ctranslate2/*.whl -WORKDIR /root +WORKDIR /opt -ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/ctranslate2/lib +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ctranslate2/lib -ENTRYPOINT ["/root/ctranslate2/bin/translate"] +ENTRYPOINT ["/opt/ctranslate2/bin/translate"] diff --git a/docker/build_all.sh b/docker/build_all.sh index 67fcded3..1358ef1c 100755 --- a/docker/build_all.sh +++ b/docker/build_all.sh @@ -1,4 +1,6 @@ -#!/bin/sh +#!/bin/bash + +set -e VERSION=${1:-latest} PUSH=${2:-0} |