google-cloud-run

Flask web app on Cloud Run – google.auth.exceptions.DefaultCredentialsError:

Flask web app on Cloud Run – google.auth.exceptions.DefaultCredentialsError: Question: I’m hosting a Flask web app on Cloud Run. I’m also using Secret Manager to store Service Account keys. (I previously downloaded a JSON file with the keys) In my code, I’m accessing the payload then using os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = payload to authenticate. When I deploy the …

Total answers: 1

Python gCloud billing APIs from CloudRun container instance gives 404 error

Python gCloud billing APIs from CloudRun container instance gives 404 error Question: The account that is running cloudrun has been linked to the billing account, but still the cloud billing python apis throw errors. What else needs to be done in the service account ? #1. Created json token for service account and passed into …

Total answers: 1

Cant receive Post Data to gcloud flask api from fetch function in react app

Cant receive Post Data to gcloud flask api from fetch function in react app Question: I have a very simple api that is written in Flask and deployed to cloud cloud run. I am collecting data from the client and passing it to a cloud run flask api, and once flask receives the post request …

Total answers: 1

How can I trigger same Cloud Run job/service using different arguments?

How can I trigger same Cloud Run job/service using different arguments? Question: I’m trying to make a scrapy scraper work using cloud run. The main idea is that every 20 minutes a cloud scheduler cron should trigger the web scraper and get data from different sites. All sites have the same structure, so I would …

Total answers: 2

Dash app cannot find pages folder when deploying on GCP using gunicorn

Dash app cannot find pages folder when deploying on GCP using gunicorn Question: I am trying to deploy my dash app which uses dash_extensions, Dash_proxy and has multiple pages in the pages folder on GCP cloud run using gunicorn but the app cannot find the pages folder. It works perfectly fine when I use the …

Total answers: 1

Running large pipelines on GCP

Running large pipelines on GCP Question: I want to scale on cloud a one off pipeline I have locally. The script takes data from a large (30TB), static S3 bucket made up of PDFs I pass these PDFs in a ThreadPool to a Docker container, which gives me an output I save the output to …

Total answers: 2

Why does running `gcloud run deploy`, exactly according to the tutorial, give the error "image must be specified"

Why does running `gcloud run deploy`, exactly according to the tutorial, give the error "image must be specified" Question: I’m following the Google Cloud Run quickstart for Python, but it ain’t working. I am running Python 3.7, have gcloud installed, and have all the necessary permissions on my project. Here’s the tutorial I followed: https://cloud.google.com/run/docs/quickstarts/build-and-deploy/deploy-python-service …

Total answers: 2

Cloud Run with Gunicorn Best-Practise

Cloud Run with Gunicorn Best-Practise Question: I am currently working on a service that is supposed to provide an HTTP endpoint in Cloud Run and I don’t have much experience. I am currently using flask + gunicorn and can also call the service. My main problem now is optimising for multiple simultaneous requests. Currently, the …

Total answers: 2

How to generate a Blob signed url in Google Cloud Run?

How to generate a Blob signed url in Google Cloud Run? Question: Under Google Cloud Run, you can select which service account your container is running. Using the default compute service account fails to generate a signed url. The work around listed here works on Google Cloud Compute — if you allow all the scopes …

Total answers: 6

"[CRITICAL] WORKER TIMEOUT" in logs when running "Hello Cloud Run with Python" from GCP Setup Docs

"[CRITICAL] WORKER TIMEOUT" in logs when running "Hello Cloud Run with Python" from GCP Setup Docs Question: Following the tutorial here I have the following 2 files: app.py from flask import Flask, request app = Flask(__name__) @app.route(‘/’, methods=[‘GET’]) def hello(): """Return a friendly HTTP greeting.""" who = request.args.get(‘who’, ‘World’) return f’Hello {who}!n’ if __name__ == …

Total answers: 5