Topic 22 - Deploy MNIST model to production project

When I am trying to deploy MNIST model to production project.

git clone https://github.com/cloudxlab/ml.git
export PATH=/usr/local/anaconda/bin/:$PATH
cd ml/projects/deploy_mnist/
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
mkdir -p trained_models
python train_mnist_model.py
cd flask_app
export LC_ALL=en_US.utf-8
export LANG=en_US.utf-8
export FLASK_APP=predictions.py

Above steps are working fine. But I am getting error when I run below command -
flask run --host 0.0.0.0 --port 4041
Its giving error “Address already in use”

I tried all the ports between 4041 to 4060 - for few ports I am getting above error and for rest of the ports command keeps continue to run and never completes

Please help to rectify this problem