- M. Alief Faisal Hakim 162112233026
- Edbert Fernando 162112233030
- Kevin Oktavio Reyhannada 162112233016
- Muhamad Ridho Al Isya 162112233009
- Christopher Geoffrey 162112233071
Public URL: http://34.128.67.116:8501/
Alternative Link: https://webapp-zxsqmv63ta-uc.a.run.app/)
- Navigate to the
web_app/
directory:
cd web_app/
- Install required dependencies on local:
pip install -r requirements.txt
- Test the streamlit app on local:
streamlit run app.py
(Note: Run as administrator on Windows and remove "sudo" in commands)
- Important - Make sure you have installed Docker on your PC:
- Linux: Docker
- Windows/Mac: Docker Desktop
- Start Docker:
- Linux (Home Directory):
sudo systemctl start docker
- Windows: You can start Docker engine from Docker Desktop.
-
Navigate to the
flask_api/
directory:cd flask_api/
-
Build the Docker image:
docker build -t flask_api_image .
-
Run the Docker container:
docker run -p 5000:5000 flask_api_image
-
Navigate to the
web_app/
directory:cd ../web_app/
-
Build the Docker image:
docker build -t web_app_image .
-
Run the Docker container:
docker run -p 8501:8501 web_app_image
- Flask API: http://localhost:5000
- Web App: http://localhost:8501
- In a different terminal window, you can check the running containers with:
sudo docker ps
- Stop the container:
- Use
ctrl + c
or stop it from Docker Desktop.
- Check all containers:
sudo docker ps -a
- Delete the container if you are not going to run this again:
sudo docker container prune
-
Sign up on Docker Hub.
-
Create a repository on Docker Hub.
-
Log in to Docker Hub from the terminal. You can log in with your password or access token.
sudo docker login
- Tag your local Docker image to the Docker Hub repository:
sudo docker tag Image_ID username/repo-name:tag
- 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.)
- Command to force delete an image (but don't do this yet):
$ sudo docker rmi -f IMAGE_ID