rochacbruno / python-project-template

DO NOT FORK, CLICK ON "Use this template" - A github template to start a Python Project - this uses github actions to generate your project based on the template.
https://github.com/rochacbruno/python-project-template/generate
The Unlicense
1.06k stars 157 forks source link

Change the Containerfile #30

Closed brahle closed 1 year ago

brahle commented 1 year ago

Summary :memo:

Alpine distribution of python is very slow when using pip to install the dependencies. For a requirements.txt file that includes pandas and numpy, it ran for about 25 minutes. According to this Stack Overflow answer, Alpine downloads the source file and compiles them from scratch, which is inefficient.

Changing the source image to -slim drops the time for that step down to 1.5 minutes.

Details

  1. Change the initial container image from -alpine to -slim.

Bugfixes :bug: (delete if didn't have any)

Checks