Skip to content

alieffsl/customer-churn-pred

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Ujian Tengah Semester - Cloud Computing RK-A1

Anggota Kelompok 12:

  • M. Alief Faisal Hakim 162112233026
  • Edbert Fernando 162112233030
  • Kevin Oktavio Reyhannada 162112233016
  • Muhamad Ridho Al Isya 162112233009
  • Christopher Geoffrey 162112233071

Test the streamlit app on local:

  1. Navigate to the web_app/ directory:
    cd web_app/
  1. Install required dependencies on local:
pip install -r requirements.txt
  1. Test the streamlit app on local:
streamlit run app.py

Building the docker image

(Note: Run as administrator on Windows and remove "sudo" in commands)

  1. Important - Make sure you have installed Docker on your PC:
  • Linux: Docker
  • Windows/Mac: Docker Desktop
  1. Start Docker:
  • Linux (Home Directory):
    sudo systemctl start docker
    
  • Windows: You can start Docker engine from Docker Desktop.

Flask API:

  1. Navigate to the flask_api/ directory:

    cd flask_api/
  2. Build the Docker image:

    docker build -t flask_api_image .
  3. Run the Docker container:

    docker run -p 5000:5000 flask_api_image

Web App:

  1. Navigate to the web_app/ directory:

    cd ../web_app/
  2. Build the Docker image:

    docker build -t web_app_image .
  3. Run the Docker container:

    docker run -p 8501:8501 web_app_image

Access URLs

  1. In a different terminal window, you can check the running containers with:
sudo docker ps
  1. Stop the container:
  • Use ctrl + c or stop it from Docker Desktop.
  1. Check all containers:
sudo docker ps -a
  1. Delete the container if you are not going to run this again:
sudo docker container prune

Pushing the docker image to Docker Hub

  1. Sign up on Docker Hub.

  2. Create a repository on Docker Hub.

  3. Log in to Docker Hub from the terminal. You can log in with your password or access token.

sudo docker login
  1. Tag your local Docker image to the Docker Hub repository:
sudo docker tag Image_ID username/repo-name:tag
  1. Push the local Docker image to the Docker Hub repository:
sudo docker push username/repo-name:tag

(If you want to delete the image, you can delete the repository in Docker Hub and force delete it locally.)

  1. Command to force delete an image (but don't do this yet):
$ sudo docker rmi -f IMAGE_ID

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published