Commit ec1e5734 authored by Riyad Parvez's avatar Riyad Parvez Committed by calberti
Browse files

Reduced size of Docker image (#234)



As Docker builds are layer by layer, removing cached package files in different layers do not reduce image size. To reduce image size, cached packages have to removed in the same layer i.e., `RUN` command as the packages have been installed.
Signed-off-by: default avatarRiyad Parvez <social.riyad@gmail.com>
parent 65b23f98
...@@ -15,13 +15,13 @@ RUN mkdir -p $SYNTAXNETDIR \ ...@@ -15,13 +15,13 @@ RUN mkdir -p $SYNTAXNETDIR \
&& ./bazel-0.2.2b-installer-linux-x86_64.sh --user \ && ./bazel-0.2.2b-installer-linux-x86_64.sh --user \
&& git clone --recursive https://github.com/tensorflow/models.git \ && git clone --recursive https://github.com/tensorflow/models.git \
&& cd $SYNTAXNETDIR/models/syntaxnet/tensorflow \ && cd $SYNTAXNETDIR/models/syntaxnet/tensorflow \
&& echo "\n\n\n" | ./configure && echo "\n\n\n" | ./configure \
RUN cd $SYNTAXNETDIR/models/syntaxnet \
&& bazel test --genrule_strategy=standalone syntaxnet/... util/utf8/... \
&& apt-get autoremove -y \ && apt-get autoremove -y \
&& apt-get clean && apt-get clean
RUN cd $SYNTAXNETDIR/models/syntaxnet \
&& bazel test --genrule_strategy=standalone syntaxnet/... util/utf8/...
WORKDIR $SYNTAXNETDIR/models/syntaxnet WORKDIR $SYNTAXNETDIR/models/syntaxnet
CMD [ "sh", "-c", "echo 'Bob brought the pizza to Alice.' | syntaxnet/demo.sh" ] CMD [ "sh", "-c", "echo 'Bob brought the pizza to Alice.' | syntaxnet/demo.sh" ]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment