Compare commits

..

No commits in common. "f4caa7a9247c76f240d1f66e5513463d6a937779" and "30f1023f6c0474cc6b6d07a7a9fba5291453c9e7" have entirely different histories.

2 changed files with 11 additions and 28 deletions

View File

@ -1,38 +1,26 @@
FROM alpine:3.14
FROM python:3-slim
# Set working space
WORKDIR /usr/src/app
# Install dependencies
RUN apk update --no-cache \
# Install packages
&& apk add --no-cache \
tzdata \
python3 py3-pip py3-numpy py3-pandas py3-matplotlib \
wkhtmltopdf \
RUN apt-get update \
# Prevent endless waiting
&& DEBIAN_FRONTEND=noninteractive \
# Set UTC as timezone
&& ln -snf /usr/share/zoneinfo/Europe/Rome /etc/localtime \
# Install APT packages
&& apt-get install -y --fix-missing wkhtmltopdf gfortran \
# Remove tmp files
&& rm -rf /tmp/* /var/tmp/* \
&& apt-get clean && rm -rf /tmp/* /var/tmp/* \
# Add PiWheels support
&& echo "[global]\nextra-index-url=https://www.piwheels.org/simple" >> /etc/pip.conf \
# Upgrade PIP
&& python3 -m pip install --no-cache-dir --upgrade pip
# Copy PIP extra index URLs
COPY pip.conf .
# Copy requirements
# Copy and install requirements
COPY requirements.txt .
# Install requirements
RUN apk update --no-cache \
# Install tmp packages
&& apk add --no-cache --virtual build-deps gcc python3-dev musl-dev build-base freetype-dev libpng-dev openblas-dev \
# Add PIP extra index URLs
&& mv pip.conf /etc/pip.conf \
# Install PIP packages
&& python3 -m pip install --no-cache-dir -r requirements.txt \
# Delete tmp packages
&& apk del build-deps
RUN python3 -m pip install -r requirements.txt
# Copy app
COPY . .

View File

@ -1,5 +0,0 @@
[global]
index-url = https://alpine-wheels.github.io/index
extra-index-url = https://pypi.python.org/simple
https://pypi.org/simple
https://www.piwheels.org/simple