Deploy a Python Visualization Panel App to Google Cloud App Engine

Sophia Yang · Beginner ·☁️ DevOps & Cloud ·4y ago

Key Takeaways

This video demonstrates how to deploy a Python visualization panel app to Google Cloud App Engine without using Docker or Kubernetes. It covers four steps: Google Cloud setup, creating a Panel app, deploying the app to Google Cloud App Engine, and setting up GitHub Actions for automating the workflow.

Full Transcript

how to deploy a python visualization panel app to google cloud using the google cloud app engine we're going to cover four steps the first step is google cloud setup second is to create a panel app and the third is to deploy the planner app to the google cloud app engine and finally we're gonna try to set up the github actions for automating the workflow you should be able to create a panel app that looks like this and this is running on google cloud um i know this this is a simple very simple demonstration with a few lines of code this is not a pre printed demo but this is just for a simple demonstration panel is a very powerful tool there is a website called awesomepanel.org where you can see all the pretty python visualization projects yeah check it out if you're interested in the panel app step google cloud setup you can go to this page this is the app app engine python 3 quick start and then it listed a couple steps we need to do let's first go to the project selector and create a new project let's call it piano demo project id panel demo is it taken cool okay so let's go to the second thing we need to enable the billion um i think billion right you need to enable billing on the project signing to manage billing accounts yeah we can create an account here here i have an account and it is covered for all my projects so we're all set over there but if you don't have billions set up you might want to set it up right now third step is to enable the cloud build api let's do that very quick yeah here we see we're on the right project or to enable it and finally we have the install and initializing the cloud sdk yeah you can follow the steps i already did this one so um i will not show you this step but you can just go through this it's really easy so now if we we're in the terminal we should be able to do gcloud in it to initialize the cloud sdk i already did that and then we need to do the uh set project to the current panel gcp demo project and now i can go to the next step create a panel app uploaded all my files to this github repo let's go through all the files here we have the app.pi which is the python file that creates the panel app if you run panel serve in your command line locally you can serve it locally and then second we have the requirements.txt which lists all the package dependencies our panel app depends on and finally we have the app.yaml this is the app engine configuration file for the panel app which depends on bokeh we need to define the environment as as the flexible environment um i think it's because the app engine flexible environment supports web sockets um if your if your app doesn't depend on okay you might not need the flexible environment and then we need to define the entry points um yeah this should work just for everybody and deploy our app to the google cloud app engine with those three files first of all we need to initiate your app engine app okay now we can do g cloud app deploy to see if that works seven minutes let's finish running now we can see what it looks like so that's all this window opened up now i can see that this app has been served on google cloud yay with our demo project that is great so in our repo we have this github workflows in python app demo file this is the configuration for github actions we're telling it whenever we're pushing a change to our main branch um it will run the job of deploy and app engine app so it will redeploy every time we push changes to main maine yeah so the only thing we need from here is the uh the project and also the credentials of the project um this is the we need to create a service account and put the credentials here um so the secrets are actually stored right here gdp credentials and uh gcp project okay i'm gonna show you how to get the credentials next it's on this page where we enable the im api next enable here we go to create a service account select the right project for github options options create and continue select row we do owner continue and that's it okay so we have all the service account for the project so this is the one we just created we can take a look okay this next thing we need to do is we need to create keys now we need to create a new key and save it as a json file let's do it okay now it's saved here i open up the json file i'm just gonna copy and paste it into the github section credentials update value day value here an update project we have panel gcp demo okay now it should work okay now let's make some changes to our repository our files right how about let's create a new app up let's call it app 1. i'll just do the exact the same thing here and then for [Music] the app.ymo let's try to serve both apps at the same time see what happens add another app for nine minutes and this build runs successfully and we we can go to this page again we see there are two apps you can go to either one of the app and they look the same because i just copy and paste one nap to another yeah so here is how you deploy things um that's it for today's video thank you

Original Description

Is it possible to deploy a Python app or dashboard to the cloud without knowing anything about Docker or Kubernetes and without using a Dockerfile? Yes, it is possible and it is surprisingly simple using the Google Cloud App Engine! This article will walk you through how to deploy a Panel app to Google Cloud with only three short scripts and show how to automate your workflow with Github Actions. All the code mentioned in this article is available at this repo: https://github.com/sophiamyang/panel_gcp. Check out my Medium blog on this: https://towardsdatascience.com/deploy-a-python-visualization-panel-app-to-google-cloud-cafe558fe787?sk=98a75bd79e98cba241cc6711e6fc5be5
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Sophia Yang · Sophia Yang · 4 of 60

1 Customer lifetime value in a discrete-time contractual setting (math and Python implementation)
Customer lifetime value in a discrete-time contractual setting (math and Python implementation)
Sophia Yang
2 Time series analysis using Prophet in Python — Math explained
Time series analysis using Prophet in Python — Math explained
Sophia Yang
3 Multiclass logistic/softmax regression from scratch
Multiclass logistic/softmax regression from scratch
Sophia Yang
Deploy a Python Visualization Panel App to Google Cloud App Engine
Deploy a Python Visualization Panel App to Google Cloud App Engine
Sophia Yang
5 Deploy a Python Visualization Panel App to Google Cloud Run
Deploy a Python Visualization Panel App to Google Cloud Run
Sophia Yang
6 [Read a paper (with code)] Beyond Accuracy: Behavioral Testing of NLP models with CheckList
[Read a paper (with code)] Beyond Accuracy: Behavioral Testing of NLP models with CheckList
Sophia Yang
7 5-step data science workflow
5-step data science workflow
Sophia Yang
8 Multi-armed bandit algorithms - ETC Explore then Commit
Multi-armed bandit algorithms - ETC Explore then Commit
Sophia Yang
9 Multi-armed bandit algorithms - Epsilon greedy algorithm
Multi-armed bandit algorithms - Epsilon greedy algorithm
Sophia Yang
10 User retention analysis framework | data science product sense
User retention analysis framework | data science product sense
Sophia Yang
11 Visualization and Interactive Dashboard in Python: My favorite Python Viz tools — HoloViz
Visualization and Interactive Dashboard in Python: My favorite Python Viz tools — HoloViz
Sophia Yang
12 Multi-armed bandit algorithms: Thompson Sampling
Multi-armed bandit algorithms: Thompson Sampling
Sophia Yang
13 The Easiest Way to Create an Interactive Dashboard in Python
The Easiest Way to Create an Interactive Dashboard in Python
Sophia Yang
14 Big Data Visualization Using Datashader in Python | How does Datashader work and why is it so fast?
Big Data Visualization Using Datashader in Python | How does Datashader work and why is it so fast?
Sophia Yang
15 Why do you want to be a data scientist? Don't be a data scientist if ...
Why do you want to be a data scientist? Don't be a data scientist if ...
Sophia Yang
16 Johnny Depp v Amber Heard Twitter Sentiment Analysis | Is Camille Vasquez the real winner | 🤗 NLP
Johnny Depp v Amber Heard Twitter Sentiment Analysis | Is Camille Vasquez the real winner | 🤗 NLP
Sophia Yang
17 How to build a product that sells itself | Product-led Growth | Book Summary | Read a book with me
How to build a product that sells itself | Product-led Growth | Book Summary | Read a book with me
Sophia Yang
18 Designing Machine Learning Systems | book summary | Read a book with me
Designing Machine Learning Systems | book summary | Read a book with me
Sophia Yang
19 Where do data scientists/analysts go next? Love and hate in data analytics (ft. Shashank Kalanithi)
Where do data scientists/analysts go next? Love and hate in data analytics (ft. Shashank Kalanithi)
Sophia Yang
20 Meet the Author: Fundamentals of Data Engineering | DS/ML book club
Meet the Author: Fundamentals of Data Engineering | DS/ML book club
Sophia Yang
21 What's new in hvPlot releases 0.8.0 & 0.8.1?
What's new in hvPlot releases 0.8.0 & 0.8.1?
Sophia Yang
22 Meet the Author: Machine Learning Design Patterns | What do ML/Research Engineers do at Google?
Meet the Author: Machine Learning Design Patterns | What do ML/Research Engineers do at Google?
Sophia Yang
23 Machine Learning Design Patterns | Google Executive | Investor | Meet the Author
Machine Learning Design Patterns | Google Executive | Investor | Meet the Author
Sophia Yang
24 How to solve data quality issues | Data Reliability | Meet the Author
How to solve data quality issues | Data Reliability | Meet the Author
Sophia Yang
25 Reliable Machine Learning author interview | DS/ML book club
Reliable Machine Learning author interview | DS/ML book club
Sophia Yang
26 Toronto VLOG | First vlog | Meet my favorite author | Toronto ML Summit conference
Toronto VLOG | First vlog | Meet my favorite author | Toronto ML Summit conference
Sophia Yang
27 TOP 6 tech news in 2022 #shorts
TOP 6 tech news in 2022 #shorts
Sophia Yang
28 How to deploy a Panel app to Hugging Face using Docker?
How to deploy a Panel app to Hugging Face using Docker?
Sophia Yang
29 Tech news this week | ChatGPT, Hacks, Snowflake, CES #shorts
Tech news this week | ChatGPT, Hacks, Snowflake, CES #shorts
Sophia Yang
30 🗞️ Tech news this week: ChatGPT, DreamerV3, Muse, VALL-E, Mineral, DoNotPay, Tesla, SBF... #shorts
🗞️ Tech news this week: ChatGPT, DreamerV3, Muse, VALL-E, Mineral, DoNotPay, Tesla, SBF... #shorts
Sophia Yang
31 Tech news this week | Boston Dynamics, Microsoft, Snowflake, Google, and more #shorts
Tech news this week | Boston Dynamics, Microsoft, Snowflake, Google, and more #shorts
Sophia Yang
32 The story of Metaflow | Effective Data Science Infrastructure | Book author interview
The story of Metaflow | Effective Data Science Infrastructure | Book author interview
Sophia Yang
33 Tech news this week #shorts
Tech news this week #shorts
Sophia Yang
34 A day in life of a data scientist | Data Day Texas | Interview 12 authors/speakers
A day in life of a data scientist | Data Day Texas | Interview 12 authors/speakers
Sophia Yang
35 Tech news this week #shorts
Tech news this week #shorts
Sophia Yang
36 Explainable AI with Shapley Values (Part 1: Game Theory)
Explainable AI with Shapley Values (Part 1: Game Theory)
Sophia Yang
37 Explainable AI with Shapley Values (Part 2: Estimate Shapley Values)
Explainable AI with Shapley Values (Part 2: Estimate Shapley Values)
Sophia Yang
38 Explainable AI with Shapley Values (Part 3: KernelSHAP)
Explainable AI with Shapley Values (Part 3: KernelSHAP)
Sophia Yang
39 Tech news this week | AI search war between Microsoft and Google #shorts
Tech news this week | AI search war between Microsoft and Google #shorts
Sophia Yang
40 The Story of ChatGPT's creator OpenAI | From Riches to Fame
The Story of ChatGPT's creator OpenAI | From Riches to Fame
Sophia Yang
41 Explainable AI for Practitioners | Must-read for XAI | author interview
Explainable AI for Practitioners | Must-read for XAI | author interview
Sophia Yang
42 Train your own language model with nanoGPT | Let’s build a songwriter
Train your own language model with nanoGPT | Let’s build a songwriter
Sophia Yang
43 The easiest way to work with large language models | Learn LangChain in 10min
The easiest way to work with large language models | Learn LangChain in 10min
Sophia Yang
44 The BEST browser? AI article summary, image generation, website insights. Microsoft Edge Copilot!
The BEST browser? AI article summary, image generation, website insights. Microsoft Edge Copilot!
Sophia Yang
45 startup scene in data | insights from 50+ data startups from Data Council
startup scene in data | insights from 50+ data startups from Data Council
Sophia Yang
46 NLP with Transformers author interview with Lewis Tunstall from Hugging Face
NLP with Transformers author interview with Lewis Tunstall from Hugging Face
Sophia Yang
47 4 ways to do question answering in LangChain | chat with long PDF docs | BEST method
4 ways to do question answering in LangChain | chat with long PDF docs | BEST method
Sophia Yang
48 5 Steps to Build a Question Answering PDF Chatbot: LangChain + OpenAI + Panel + HuggingFace.
5 Steps to Build a Question Answering PDF Chatbot: LangChain + OpenAI + Panel + HuggingFace.
Sophia Yang
49 4 Autonomous AI Agents: “Westworld” simulation, Camel, BabyAGI, AutoGPT, Camel ⭐ LangChain ⭐
4 Autonomous AI Agents: “Westworld” simulation, Camel, BabyAGI, AutoGPT, Camel ⭐ LangChain ⭐
Sophia Yang
50 MiniGPT4: image understanding & open-source!
MiniGPT4: image understanding & open-source!
Sophia Yang
51 BEST Practices in Prompt Engineering: Learnings and Thoughts from Andrew Ng's New Course
BEST Practices in Prompt Engineering: Learnings and Thoughts from Andrew Ng's New Course
Sophia Yang
52 Designing Machine Learning Systems author interview with Chip Huyen
Designing Machine Learning Systems author interview with Chip Huyen
Sophia Yang
53 Tech news this week: code interpreter, Mojo, Redpajama, MPT7b, StarCoder #shorts
Tech news this week: code interpreter, Mojo, Redpajama, MPT7b, StarCoder #shorts
Sophia Yang
54 🤗 Hugging Face Transformers Agent | LangChain comparisons
🤗 Hugging Face Transformers Agent | LangChain comparisons
Sophia Yang
55 📢 Tech news this week #shorts
📢 Tech news this week #shorts
Sophia Yang
56 📢 Tech news this week #shorts
📢 Tech news this week #shorts
Sophia Yang
57 The BEST ChatGPT Plugins | Brand NEW Bing Search | Web browsing, CODING, summarizing, and more
The BEST ChatGPT Plugins | Brand NEW Bing Search | Web browsing, CODING, summarizing, and more
Sophia Yang
58 Tech news this week #shorts #short
Tech news this week #shorts #short
Sophia Yang
59 📢 Tech news this week #shorts
📢 Tech news this week #shorts
Sophia Yang
60 Deep Learning with PyTorch Author Interview with Eli Stevens, Luca Antiga, and Thomas Viehmann
Deep Learning with PyTorch Author Interview with Eli Stevens, Luca Antiga, and Thomas Viehmann
Sophia Yang

This video teaches how to deploy a Python visualization panel app to Google Cloud App Engine and automate the workflow using GitHub Actions. It covers the necessary steps and configurations for a successful deployment.

Key Takeaways
  1. Create a new Google Cloud project
  2. Enable billing and Cloud Build API
  3. Install and initialize the Cloud SDK
  4. Create a Panel app
  5. Define the app engine configuration in app.yaml
  6. Deploy the app to Google Cloud App Engine using gcloud
  7. Set up GitHub Actions for automation
💡 The App Engine flexible environment supports web sockets, making it suitable for apps that depend on them.

Related AI Lessons

`wrangler dev --remote` silently writes to your production KV namespace — here's the fix
Learn how to safely use wrangler dev --remote with live KV namespaces without overwriting production data
Dev.to · 강해수
Qwen 3.6 27B Is the Local Dev Sweet Spot — Here's Why
Discover why Qwen 3.6 27B is the ideal choice for local development, and how it can boost your productivity
Dev.to · Carter May
Deploying Spring Petclinic Microservices with Docker Compose: An End-to-End DevOps Deployment Experience
Learn to deploy Spring Petclinic microservices with Docker Compose for a seamless DevOps experience
Dev.to · Nice Nwogu
Qwen 3.6 27B Is the Local Dev Sweet Spot — Here's Why
Discover why Qwen 3.6 27B is the ideal choice for local development, offering a sweet spot for efficiency and performance
Dev.to · Carter May
Up next
Containers on Amazon ECS with Mama J
AWS Developers
Watch →