mirror of
https://github.com/facebook/duckling.git
synced 2024-08-17 17:20:55 +03:00
Summary: Applied fix mentioned in https://github.com/facebook/duckling/issues/671 to resolve https://github.com/facebook/duckling/issues/671 Since, no PR to fix this is present, I simply open a PR with the suggestion of AbstractUmbra. The suggested fix seems to work (Docker Image builds and is operational) Pull Request resolved: https://github.com/facebook/duckling/pull/685 Test Plan: The author verified that the docker image works - it was missing some dependencies before. There's no way to test this in sigma, but the change makes sense. Reviewed By: haoxuany Differential Revision: D34697708 Pulled By: stroxler fbshipit-source-id: 2731604e136acfd74d4eedf3bf309f79894bb981
40 lines
954 B
Docker
40 lines
954 B
Docker
FROM haskell:8-buster AS builder
|
|
|
|
RUN apt-get update -qq && \
|
|
apt-get install -qq -y libpcre3 libpcre3-dev build-essential pkg-config --fix-missing --no-install-recommends && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
RUN mkdir /log
|
|
|
|
WORKDIR /duckling
|
|
|
|
ADD . .
|
|
|
|
ENV LANG=C.UTF-8
|
|
|
|
RUN stack setup
|
|
|
|
ADD . .
|
|
|
|
# NOTE:`stack build` will use as many cores as are available to build
|
|
# in parallel. However, this can cause OOM issues as the linking step
|
|
# in GHC can be expensive. If the build fails, try specifying the
|
|
# '-j1' flag to force the build to run sequentially.
|
|
RUN stack install
|
|
|
|
FROM debian:buster
|
|
|
|
ENV LANG C.UTF-8
|
|
|
|
RUN apt-get update -qq && \
|
|
apt-get install -qq -y libpcre3 libgmp10 --no-install-recommends && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
COPY --from=builder /root/.local/bin/duckling-example-exe /usr/local/bin/
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["duckling-example-exe", "-p", "8000"]
|