Installing numpy on Docker Alpine

前端 未结 6 1795
误落风尘
误落风尘 2020-12-08 19:26

I\'m trying to install numpy in a docker container based on Alpine 3.1. I\'m using the following Dockerfile:

FROM alpine:3.1
RUN apk add --update make cmake          


        
6条回答
  •  青春惊慌失措
    2020-12-08 19:43

    This one is about 311MB according to my docker images:

    FROM python:3.6-alpine
    RUN apk add g++ 
    RUN pip install numpy
    

    (Meanwhile python:3.6 is ~900MB by itself)

    Have you tried NOT having gcc installed? It might be conflicting? Not sure. This one worked for me as a minimal numpy installation and wanted to share.

提交回复
热议问题