Advertisement
Guest User

Dockerfile for alpine3.7-pandas V2

a guest
Mar 2nd, 2019
2,019
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. FROM alpine:3.7
  2.  
  3. ENV PACKAGES="\
  4. dumb-init \
  5. musl \
  6. libc6-compat \
  7. linux-headers \
  8. build-base \
  9. bash \
  10. git \
  11. ca-certificates \
  12. freetype \
  13. libgfortran \
  14. libgcc \
  15. libstdc++ \
  16. openblas \
  17. tcl \
  18. tk \
  19. libssl1.0 \
  20. "
  21.  
  22. ENV PYTHON_PACKAGES="\
  23. numpy \
  24. matplotlib \
  25. scipy \
  26. scikit-learn \
  27. nltk \
  28. "
  29.  
  30. RUN apk add --no-cache --virtual build-dependencies python3 \
  31. && apk add --virtual build-runtime build-base python3-dev openblas-dev freetype-dev pkgconfig gfortran \
  32. && ln -s /usr/include/locale.h /usr/include/xlocale.h \
  33. && python3 -m ensurepip \
  34. && rm -r /usr/lib/python*/ensurepip \
  35. && pip3 install --upgrade pip setuptools \
  36. && ln -sf /usr/bin/python3 /usr/bin/python \
  37. && ln -sf pip3 /usr/bin/pip \
  38. && rm -r /root/.cache \
  39. && pip install --no-cache-dir $PYTHON_PACKAGES \
  40. && pip3 install 'pandas<0.21.0' \
  41. && apk add --no-cache --virtual build-dependencies $PACKAGES \
  42. && rm -rf /var/cache/apk/*
  43.  
  44. COPY requirements.txt /requirements.txt
  45.  
  46. RUN apk add --no-cache postgresql-dev libffi-dev libressl-dev libxml2 libxml2-dev libxslt libxslt-dev libjpeg-turbo-dev zlib-dev
  47.  
  48. RUN pip3 install -r /requirements.txt
  49.  
  50. RUN apk del build-runtime
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement