Source:
https://www.youtube.com/watch?v=LxHiCZCKwa8
1. Open GCP console and click on the cloud shell icon on top right [Make sure cloud shell is enabled]
2. Create a new folder
mkdir myproject
3. In the project folder, create a requirements.txt file
nano requirements.txt
4. Create a Dockerfile to build the container
nano Dockerfile
5. Use gsutil to copy files (src code, pkl files etc) from the cloud storage
6.Make the Dockerfile executable
chmod +x Dockerfile
7. Build the dockerfile to a tag. [HOSTNAME]/[PROJECT ID]/[GIVE A NAME]
gcloud builds submit --tag gcr.io/stock-288218/mabolfadl_stk
8. Deploy the container using the command below
gcloud run deploy --image gcr.io/stock-288218/mabolfadl_stk
9. A link will appear which can be used to interact with container
No comments:
Post a Comment