如何为可以安装 scikit-learn 的 Raspbian 硬件制作 Dockerfile?我对 debian-slim 或 Alpine Linux 镜像没有任何运气。
# Use a base image for Raspberry Pi with Alpine Linux
FROM arm32v6/alpine:3.14
# Update package repositories and install necessary dependencies
RUN apk --no-cache update && \
apk --no-cache add python3 python3-dev py3-pip build-base gcc gfortran wget freetype-dev libpng-dev openblas-dev && \
ln -s /usr/include/locale.h /usr/include/xlocale.h
# Install scikit-learn and bacpypes3 using pip3
RUN pip3 install scikit-learn bacpypes3
# Clean up by removing unnecessary packages and cache
RUN apk del python3-dev py3-pip build-base gcc gfortran && \
rm -rf /var/cache/apk/*
# Set the working directory
WORKDIR /app
# Start your application
CMD ["python3", "bacnet_server.py"]