Skip to content

drpreetyrai/AI-Backend-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1. Introduction

  • Overview of Docker and FastAPI
  • Why use Docker and FastAPI? Benefits in development and deployment.

2. Setting Up Docker

  • Docker Installation
  • Ensure Docker Desktop is Running (Important Note)
  • Basic Docker Commands
    • docker --help, docker run --help, docker ps --help
    • Top 10 Important Docker Commands:
      • docker run
      • docker ps
      • docker tag
      • docker images
      • docker pull
      • docker push
      • docker build
      • docker exec
      • docker stop
      • docker rm

3. Dockerfile and Docker Compose

  • Creating a Dockerfile
    • Explanation of key instructions (FROM, RUN, CMD, etc.)
  • Introduction to Docker Compose
    • Top 10 Important Docker Compose Commands:
      • docker-compose up
      • docker-compose down
      • docker-compose build
      • docker-compose ps
      • docker-compose logs
      • docker-compose exec
      • docker-compose stop
      • docker-compose rm
      • docker-compose restart
      • docker-compose scale
  • Scaling with Docker Compose
    • Example: Scaling up with --scale (multiple instances with different ports)
  • Nginx as a Reverse Proxy
    • Basic setup of Nginx for load balancing and reverse proxy.

4. Working with Docker Images

  • Pushing to Docker Hub
    • Docker Credentials Setup
      • docker login (enter username and password)
    • Tagging and Pushing Images
      • docker tag hello-world laxmimerit/hello-world:latest
      • docker push laxmimerit/hello-world:latest
  • Saving and Loading Docker Images
    • Save image to a tar/zip file: docker save -o hello-world.tar laxmimerit/hello-world:latest
    • Load image from tar/zip file: docker load -i hello-world.tar

5. Integrating ML Code with Docker

  • Adding and running ML code inside Docker containers.

6. Deploying Docker Containers to Cloud

  • Pushing to AWS
    • Push to AWS S3 Bucket (optional)
    • Push to AWS ECR (Elastic Container Registry)
  • Deploying on AWS
    • Deploying to AWS ECS (Elastic Container Service)
    • Deploying to AWS EC2 (Elastic Compute Cloud)

7. Final Project

  • Build a FastAPI application, containerize it, and deploy it using Docker and AWS.

8. Docker Installation

  • sudo apt-get remove docker docker-engine docker.io containerd runc

  • sudo apt-get update

  • sudo apt-get install docker.io

  • sudo systemctl start docker

  • sudo systemctl enable docker

  • sudo usermod -aG docker $USER

  • sudo systemctl status docker

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published