I want to deploy a python streamlit app using compute engine as my company does not provide access to app engine yet. Is there a way to deploy the app using compute engine rather than app engine on google cloud. I have searched multiple forum but unable to find relevant answers.
Sorry for the more general question; I hope someone can help me get over this hurdle or maybe point me to a resource.
If your application is containerized, I would suggest deploying it to Google Cloud Run instead of Compute Engine. Cloud Run is a serverless cloud service used to easily deploy pre-built applications. One of its main advantages is that it automates most of the resources management process. Therefore, all you have to do is to tell Cloud Run where your Docker image is, and then Cloud Run will deploy it on a serverless environment without needing to specify the optimal number of resources for example.
Related
I have a python script which run 24 hours on my local system and my script uses different third party libraries that are installed using pip in python
Libraries
BeautifulSoup
requests
m3u8
My python script is recording some live stream videos from a website and is storing on system. How google cloud will help me to run this script 24/hours daily and 7days a week.I am very new to clouds. Please help me i want to host my script on google cloud so i want to make sure that my script will work there same as it is working on local system so my money will not lost .
Yes it can. I would recommend familiarizing yourself with this Quickstart: Deploy a Python Service to Cloud Run and What is Cloud Run. When you use Cloud Run, you can provide your own Docker image that uses Python, or select from preexisting images.
Once you have a Cloud Run instance running, you can tie it into other Cloud Run instances or Cloud Functions which are scalable functions that use Cloud Run under-the-hood and allow you to easily scale your app. Additionally, these instances spin down to 0 if nobody is using the app which saves costs greatly. This can be modified of course so that the app is always spun-up.
In general I highly recommend looking at Cloud Run but also other services can handle the task such as a Compute Engine.
If you want to run 24/7 application on the cloud, whatever the cloud, you must not use solution with timeout (like Cloud Run or Cloud Functions).
You can imagine using App Engine flex, but it won't be my best advice.
The most efficient for me (low maintenance, cost efficient), is to use GKE autopilot. A Kubernetes cluster managed for you, you pay only the CPU/Memory that your workloads use.
You have to containerize your app to do that.
So, I am working on a project that has a backend optimization algorithm written in GAMS.
The ideal solution is to be able to use this GAMS code that is already written with the python API for GAMS. I want to be able to call this code through an HTTP request and run the algorithm, so I wanted to make a Flask server for this. Ideally, it could run in Google's App Engine, but GAMS software must be installed.
I am not sure if this is possible on App Engine, or if it can be done in a Google instance.
The data input would be from CSV's in google cloud storage and the output would be put there as well.
I was wondering if anyone has tried this before or if you know more about Google cloud and think this will or will not work. I could not find much about this online.
Your question would benefit from more detail and including references e.g. Is this GAMS?
App Engine standard is opinionated and it may not (don't know) be possible for you to bundle GAMS as part of a Python deployment to App Engine standard.
However, if you were willing to bundle a Python (Flask) server and GAMS together, it's possible you could containerize the solution and run it on App Engine flexible as a custom runtime.
Alternatives exist and may be better matches to your needs including detaching the (Flask) frontend server from the GAMS backend (?) and deploying these on App Engine (or possibly Cloud using Functions, Cloud Run, Compute Engine etc.).
Someone who has done this may be willing to provide additional pointers|guidance.
The best solution to this problem, I found, was to get rid of GAMS entirely.
There were many ways I wished to integrate this model into my web app, so I translated the model to Python using PyOMO. The performance was slightly affected, but the model can now be run in Google Cloud.
I set up the model in a Flask server and now built a REST API around it for use in the web app.
I have built three ML keras models for image classification and implement their weights in a Flask application for a comparative analysis about the testing accuracies. It works perfectly with the Flask server in the localhost.
Now I want to deploy this Flask app so it would be accessible anywhere for testing with new data.
I am new to cloud platform. Can you just guide me how to deploy this Flask app.
I have watched tutorials but Im not getting any relevant one about models weight above 700Mb. It would be great if u could help me to deploy this in Google Cloud.
You can use AI Platform within Google Cloud, is a service for develop, analyze or deploy customize models and implement it as a service.
This is the link. https://cloud.google.com/ai-platform?hl=es-419
I think that Compute engine (GCE) is the GCP product that matches with you use case,in compute engine you can upload your flask application.
Compute engine is technically a VM on the cloud, you can install an uninstall packages or SW without any limitation.
In this link you can find information about how to deploy a python web application on GCE.
I just started using PYTHON and now i want to run a google vision cloud app on the server but I'm not sure how to start.
I do have a server up and running at http://18.217.137.107 and the app source code looks like https://cloud.google.com/vision/docs/detecting-landmarks#vision-landmark-detection-python.
Any help would be greatly appreciated.
What you need is a webapp built on some framework like django/flask. You can find a basic app example in the following link:
Create a basic GCP app using Flask
Please refer to this documentation about deploying Python application using Cloud Storage to App Engine Flex. Also, you might find this documentation to make an HTTP Request to Google Cloud Vision API useful, but this is based on Java and not Python.
I have created a custom python package which has few machine learning algorithms in it.
I would like to deploy this custom python package on azure as a service that can be consume by my other applications like a batch job and a website.
I have bought an azure license but have no clue on the deployment strategy. Please advice
I'd recommend using the following documentation, it will allow you to Deploy Python application to Azure App Service using VSTS.The lab would provide you with the same skills to deploy your app to Azure App service.