Bangkit Capstone Project
Dependencies
pip install tensorflow
pip install zipfile36
pip install opencv-python
pip install numpy
pip install matplotlib
pip install keras-utils
- Use RoadDamageClassification.ipynb for Training
- Use app.py for Deployment
Features
-
Report of Damaged Road (Main Page)
List of reports - Navigation Bar - Detail Item (if the report item is clicked)
-
Fill the information about the road
Road - Damaged Road (Detail) - Location
Create Cloud Instance
- Name the instance (ex. CAP-0422)
- Set machine type to n1-standard-1
- Set Location Us-Central1
- Change boot disk to ubuntu (ver. 16 or 18) and use 25GB of SSD storage
- Check allow HTTP
- Click "Management, security, disks, networking, sole tenancy", Under Networking click Network interfaces and change External IP to static
- Click Create
gcloud beta compute --project=cap-0422 instances create cap-0422 --zone=us-central1-a --machine-type=n1-standard-1 --subnet=default --address=104.154.249.90 --network-tier=PREMIUM --maintenance-policy=MIGRATE --service-account=969576237823-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --tags=http-server --image=ubuntu-1804-bionic-v20210604 --image-project=ubuntu-os-cloud --boot-disk-size=25GB --boot-disk-type=pd-ssd --boot-disk-device-name=cap-0422 --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any
Create Cloud Storage
- Create bucket with unique name
- Set the location to regional and choose closest to you
- Click create
Upload Machine Learning Model & API Script
- In created bucket click upload file
- Choose the ML model and API script in your local machine
Running the API server
- SSH to created instance
- Copy file from bucket to vm using gsutil cp gs:///
- Install every package that was needed for the script to be run
- Install tmux (for background process, so it won't stop even if the vm is closed)
- Type tmux
- Run your API script
*To see running backgroud process type "tmux list" *To enter the running process type "tmux -a t 0" *To close tmux press "ctrl+d"