Skip to content

Commit

Permalink
Use release build for djl-serving docker (#1102)
Browse files Browse the repository at this point in the history
Change-Id: Ic0ec57d896c1e295fc7577ce7618dd945bcb48d3
  • Loading branch information
frankfliu authored Jul 15, 2021
1 parent 4d9aeae commit 308e149
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 320 deletions.
1 change: 0 additions & 1 deletion serving/serving/docker/.gitignore

This file was deleted.

19 changes: 9 additions & 10 deletions serving/serving/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
FROM ubuntu:18.04
ARG djl_version=0.12.0

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
fakeroot \
openjdk-8-jdk-headless
openjdk-8-jdk-headless \
curl

RUN curl -O https://publish.djl.ai/djl-serving/djl-serving_${djl_version}-1_all.deb && \
dpkg -i djl-serving_${djl_version}-1_all.deb && \
rm djl-serving_${djl_version}-1_all.deb

RUN mkdir -p /opt/djl
COPY config.properties /opt/djl/conf/

COPY dockerd-entrypoint.sh /usr/local/bin/dockerd-entrypoint.sh
COPY config.properties /opt/djl/
COPY serving /opt/djl/tmp

RUN cd /opt/djl/tmp \
&& ./gradlew copyLibs \
&& cd .. \
&& rm -rf tmp \
&& rm -rf ~/.gradle

RUN chmod +x /usr/local/bin/dockerd-entrypoint.sh

EXPOSE 8080
Expand All @@ -29,6 +27,7 @@ ENV TF_NUM_INTRAOP_THREADS=1
ENV TF_CPP_MIN_LOG_LEVEL=1
ENV MXNET_ENGINE_TYPE=NaiveEngine
ENV JAVA_OPTS="-Dai.djl.pytorch.num_interop_threads=1"
ENV MODEL_SERVER_HOME=/opt/djl

ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh"]
CMD ["serve"]
Expand Down
5 changes: 1 addition & 4 deletions serving/serving/docker/dockerd-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ set -e

if [[ "$1" = "serve" ]]; then
shift 1
java $JAVA_OPTS -cp "libs/*" ai.djl.serving.ModelServer "$APP_ARGS"
/usr/bin/djl-serving "$@"
else
eval "$@"
fi

# prevent docker exit
tail -f /dev/null
22 changes: 0 additions & 22 deletions serving/serving/docker/serving/build.gradle

This file was deleted.

1 change: 0 additions & 1 deletion serving/serving/docker/serving/gradle/wrapper/.gitignore

This file was deleted.

This file was deleted.

This file was deleted.

201 changes: 0 additions & 201 deletions serving/serving/docker/serving/gradlew

This file was deleted.

Empty file.

0 comments on commit 308e149

Please sign in to comment.