Python

Dockerfile to run python

Running the Python project or script in the docker container is relatively easy. You no need to write a huge script. herein an example.

#Deriving the latest base image
FROM python:3.10
#Setting the working directory
WORKDIR /usr/app/src

# Copying the current directory contents into the container at /usr/app/src
COPY . /usr/app/src

# Installing the requirements
RUN pip install -r requirements.txt

RUN pip install poetry
RUN poetry install

# run python script
CMD ["python", "app/main.py"]

 

Tags

Python and Segno - Generating QR codes in bulk

As you know, QR code is a graphic or an image having some information hidden within it. This information has some limits in size but mostly allows to store data related communication. QR code can be scanned by a scanner and information gets transferred to that device. It's a very easy and efficient way to quickly transfer information in the device and the device can take appropriate action after scanning is done.

 

Tags