Manage python packages to install in containers

Overview

Since the python package required to execute the program was described directly in the Dockerfile, it is centrally managed using requirements.

Managing requirements with pip-tools

Fill in the required packages in requirements.in.

requirements.in


webapp2
paste
webob

Add items related to installing pip-tools, adding requirements.in, and installing packages to the Dockerfile.

Dockerfile


RUN apt-get update && apt-get install -y python-pip
RUN pip install -U pip pip-tools

ADD ./requirements.in ./
RUN pip-compile && \
    pip install -r requirements.txt && \
    rm requirements.txt

reference

-Manage requirements.txt package version number with pip-tools

Recommended Posts

Manage python packages to install in containers
[Road to intermediate Python] Install packages in bulk with pip
Install Pyaudio to play wave in python
How to install Python
How to install python
Error when trying to install psycopg2 in Python
[2020.8 latest] How to install Python
I tried to graph the packages installed in Python
To flush stdout in Python
Login to website in Python
Speech to speech in python [text to speech]
How to develop in Python
Python install in 2 lines @Windows
Post to Slack in Python
A standard way to develop and distribute packages in Python
Introducing a good way to manage DB connections in Python
How to install python using anaconda
[Package cloud] Manage python packages with package cloud
[Python] How to do PCA in Python
MIDI packages in Python midi and pretty_midi
[python] Manage functions in a list
How to collect images in Python
Install scrapy in python anaconda environment
How to use SQLite in Python
In the python command python points to python3.8
Windows10: Install MeCab library in python
Try to calculate Trace in Python
install tensorflow in anaconda + python3.5 environment
Unable to install Python with pyenv
How to use Mysql in python
I can't install scikit-learn in Python
How to wrap C in Python
How to use ChemSpider in Python
6 ways to string objects in Python
How to use PubChem in Python
Steps to install python3 on mac
How to handle Japanese in Python
An alternative to `pause` in Python
How to install OpenCV on Cloud9 and run it in Python
install python
Upload and manage packages that are not in conda to anaconda.org
Install packages that need to be compiled with Python3 with pip [Windows]
I tried to implement PLSA in Python
[Introduction to Python] How to use class in Python?
Try logging in to qiita with Python
Modules and packages in Python are "namespaces"
How to access environment variables in Python
I tried to implement permutation in Python
Method to build Python environment in Xcode 6
How to dynamically define variables in Python
How to install and use pandas_datareader [Python]
How to do R chartr () in Python
python3 How to install an external module
[Kivy] How to install Kivy on Windows [Python]
Pin current directory to script directory in Python
[Itertools.permutations] How to put permutations in Python
PUT gzip directly to S3 in Python
Send email to multiple recipients in Python (Python 3)
Convert psd file to png in Python
Sample script to trap signals in Python
I tried to implement PLSA in Python 2