Skip to content

RajanKumarYadav/PredictionToProduction

Repository files navigation

Docker Image Creation for Flask ML APP

Workflows

  1. Create app directory
  2. Update or Copy paste all your files (Flask App, Trained Model, config files)
  3. Create requirements.txt with all your dependencies
  4. Create Docker file

How to Run ?

Clone the repository

STEP 01- Create a docker Image with tag

docker build -t diabetes_prediction_app:0.0.1 .

STEP 02- Run the Image

docker run -p 5000:5000 diabetes_prediction_app:0.0.1

Basic Docker Command

# To see all the images present in your machine
docker images
# To see all the running containers in your machine
docker ps -a
# To stop a running container
docker stop <container_id>
# To remove/delete a docker container(only if it stopped).
docker rm <container_id>
# To see the list of all the available images with their tag, image id, creation time and size.
docker image ls
# To delete a specific image
docker rmi <image_id>
# To delete a docker image forcefully
docker rmi -f <image_id>
# To delete all the docker container available in your machine
docker rm -f (docker ps -a | awk '{print$1}')
# To delete a specific image
docker image rm <image_name>

Make your docker images availalbe using Registry/DockerHub

# Tag/rename your image with your username delete a specific image
docker tag diabetes_prediction_app:0.0.1 <account_namespace_in_DockerHub>/diabetes_prediction_app:0.0.1
# Push the specific image
docker push <account_namespace_in_DockerHub>/diabetes_prediction_app:0.0.1
# Pull a specific image
docker pull <account_namespace_in_DockerHub>/diabetes_prediction_app:0.0.1

Make your docker images availalbe using tar file

# Save specific image to tar file
docker save -o image.tar <image_name>:<tag>
# Load specific image from tar file
docker load -i image.tar <image_name>:<tag>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published