Skip to content

Instantly share code, notes, and snippets.

@stanlee321
Last active August 19, 2020 22:45
Show Gist options
  • Save stanlee321/d05d52068f5c8b4034f510d3c1c605b6 to your computer and use it in GitHub Desktop.
Save stanlee321/d05d52068f5c8b4034f510d3c1c605b6 to your computer and use it in GitHub Desktop.
Minitmal docker image for python DataScience

docker image

FROM python:3-alpine
WORKDIR /usr/source/app
COPY requirements.txt ./

RUN apk update
RUN echo "http://dl-8.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk --no-cache --update-cache add gcc gfortran build-base wget freetype-dev libpng-dev openblas-dev
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
RUN pip install --no-cache-dir -r requirements.txt

Deploy to docker hub

https://www.docker.com/blog/how-to-build-and-test-your-docker-images-in-the-cloud-with-docker-hub/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment