Last active
March 3, 2023 10:10
-
-
Save pfandzelter/0d142eadf9248232ac65407a65a1562b to your computer and use it in GitHub Desktop.
slim Docker image with python3.8 and python3-igraph
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from https://github.com/igraph/python-igraph/blob/master/docker/minimal/Dockerfile | |
FROM python:3.8-alpine AS build | |
RUN apk add --no-cache --update \ | |
make cmake gcc g++ libstdc++ git libxslt-dev libxml2-dev libc-dev \ | |
libffi-dev zlib-dev libxml2 zlib libtool autoconf automake \ | |
flex bison \ | |
&& rm -rf /var/cache/apk/* | |
# this can take a while | |
# go and get a coffee | |
RUN pip3 install git+https://github.com/igraph/python-igraph | |
FROM python:3.8-slim | |
COPY --from=build /usr/local/lib/python3.8/site-packages/igraph /usr/local/lib/python3.8/site-packages/igraph | |
COPY --from=build /usr/local/bin/igraph /usr/local/bin/igraph | |
WORKDIR /usr/src/app | |
COPY requirements.txt ./ | |
RUN pip3 install --no-cache-dir -r requirements.txt | |
COPY your-script-file.py . | |
ENTRYPOINT [ "python3", "./your-script-file.py" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment