![]() ![]() Since the system had to be very cost-efficient, I wanted to make sure the underlying docker image wasn’t creating too much overhead. In a previous project, I built an elastic transcoder farm that used Docker (Alpine), Python, and FFmpeg. It also contains special optimizations for gunicorn and to build faster and safer. Skip to the end to find a Dockerfile that is +20% faster than using the default one in docker hub. Of course, there is no such thing as perfection and I’ll gladly accept feedback to improve possible issues you might find. This post will share the “perfect” Python Dockerfile. If you have any questions or feedback, leave a comment below.Having a reliable Dockerfile as your base can save you hours of headaches and bigger problems down the road. This tutorial shows you multiple ways to install Python 3.9 on Debian 10 system. Verify the installation by typing: python3.9 -version Python 3.9.0+ Conclusion # Python 3.9 has been installed from source and ready to be used. Once the build process is complete, install the Python binaries by typing: sudo make altinstall You would run the following command to start the build process for python: make -j 12įor faster build time, modify the -j to correspond to the number of cores in your processor. The -enable-optimizations option optimizes the Python binary by running multiple tests. It will do few checks that required dependencies are installed. Navigate to the Python source directory and execute the configure script. Once the download is finished, extract the tarball: tar -xf Python-3.9.0.tgz Step 3 – Configure script # Sudo apt update sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev Step 2 – Download source code #Īfter that download the latest source code from Python download page using wget: wget ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |