我打算将 ffmpeg 和 ffprobe 安装到我的 Google App Engine Flex 环境中,如何使用requirements.txt 作为包来执行此操作?
我目前正在使用 ffmpeg-python,这只是一个包装器。
ffmpeg-python==0.2.0
ffprobe-python==1.0.3
Run Code Online (Sandbox Code Playgroud)
以下是我尝试使用 ffmpeg-python 包装器时出现的错误,这是预期的,因为没有 ffmpeg 和 ffprobe 可用:
2020-05-03 11:42:36 default[20200503t112932] [03/May/2020 11:42:36] ERROR [log.py:228] Internal Server Error: /capture_thumbnail/
2020-05-03 11:42:36 default[20200503t112932] Traceback (most recent call last): File "/env/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/env/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "/env/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/vmagent/app/core/views.py", line 62, in capture_thumbnail generate_thumbnail(request, blob_uuid) File …Run Code Online (Sandbox Code Playgroud) 我有两个应用程序想要使用 Google Cloud App Engine 进行部署。
其中之一是 React 前端,我想通过 MYFRONTEND.com 提供此服务
第二个是后端,将通过 api.MYBACKEND.com 提供服务
前端yaml文件react.yaml:
runtime: nodejs16
env: standard
handlers:
- url: /static
static_dir: static
secure: always
- url: www.MYFRONTEND.com/*
service: frontend
script: auto
secure: always%
Run Code Online (Sandbox Code Playgroud)
API yaml 文件,api.yaml :
runtime: python37
entrypoint: gunicorn -b :$PORT MYAPPLICATION*emphasized text*.wsgi
service: "MYBACAKEND-api"
env: standard
handlers:
- url: api.MYBACKEND/*
service: backend
script: auto
secure: always%
Run Code Online (Sandbox Code Playgroud)
这是实现这一目标的正确方法吗?
为这两个交互式通信的独立应用程序提供服务的最佳策略是什么(前端将调用 API 以获取存储 Django 应用程序的对象信息)?
django google-app-engine app.yaml reactjs google-cloud-platform
我一直在使用带有 cloudbuild.yaml 和 Dockerfile 的 Google Cloud Build。您可以找到以下文件:
云构建.yaml
steps:
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args: ['-c', 'docker pull gcr.io/$PROJECT_ID/github.com/videoo-io/videoo-render:latest || exit 0']
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'-t', 'gcr.io/$PROJECT_ID/github.com/videoo-io/videoo-render:latest',
'--cache-from', 'gcr.io/$PROJECT_ID/github.com/videoo-io/videoo-render:latest',
'.'
]
images: ['gcr.io/$PROJECT_ID/github.com/videoo-io/videoo-render:latest']
timeout: 7200s
Run Code Online (Sandbox Code Playgroud)
Dockerfile:
FROM --platform=amd64 ubuntu:22.10
# Use baseimage-docker's init system.
# CMD ["/sbin/my_init"]
ENV GCSFUSE_REPO gcsfuse-stretch
RUN apt-get update && apt-get install --yes --no-install-recommends \
ca-certificates \
curl \
gnupg \
&& echo "deb http://packages.cloud.google.com/apt $GCSFUSE_REPO main" \
| tee /etc/apt/sources.list.d/gcsfuse.list \ …Run Code Online (Sandbox Code Playgroud) docker google-cloud-platform dockerfile google-cloud-build cloudbuild.yaml
我一直在使用 Google Cloud 免费试用帐户。
我能够从我的 Github 存储库部署 Cloud Run 版本。但是,自从我开始使用 Google Cloud Kubernetes 集群和作业(在 Google Compute Engine 中使用 2 个虚拟机)后,Cloud Run 部署开始失败:
Step #2 - "Deploy": gcr.io/google.com/cloudsdktool/cloud-sdk:slim
Step #2 - "Deploy": Deploying...
Step #2 - "Deploy": failed
Step #2 - "Deploy": Deployment failed
Step #2 - "Deploy": ERROR: (gcloud.run.services.update) spec.template.spec.containers[0].resources.limits.cpu: Invalid value specified for cpu. For the specified value, maxScale may not exceed 30.
Step #2 - "Deploy": Consider running your workload in a region with greater capacity, decreasing your …Run Code Online (Sandbox Code Playgroud) google-compute-engine google-cloud-platform google-kubernetes-engine google-cloud-build google-cloud-run
我已经创建了 Google Cloud 帐户,并且想要访问和使用 Google Secret Manager。如何使用 cloud 命令行界面启用 Google Secret Manager API?
如何查看有关已在 Google Cloud Compute Engine 上创建的 VM 的日志?
google-compute-engine google-cloud-platform google-cloud-logging stackdriver google-cloud-stackdriver
我有几个视频内容,我通过我的 Django Google App Engine 应用程序通过我的 Google Cloud Storage 共享,这些内容带有与过期时间相关联的签名 url 机制。
def get_signed_url(self, entity):
blob = bucket.get_blob(entity.url)
logging.info(entity.url)
expiration_time = timezone.now() + timedelta(minutes=120)
signed_url = blob.generate_signed_url(expiration_time)
logging.info(signed_url)
return signed_url
Run Code Online (Sandbox Code Playgroud)
尽管在 [here][1] 中解释了 GCS 和 Google Cloud CDN 的可能使用关系,但这是否适用于通过 Google Cloud Storage 流式传输视频内容(MP4 或带有 MP4 的 MPEG-DASH),因为它被提到具有隐式 CDN 本身。
如果使用 Google CDN 是广播在线视频内容的更明智的方式,那么实现这一目标的最佳策略是什么,我如何在当前使用 Google Cloud Storage 实施的基础上使用 Google Cloud CDN?
django google-app-engine google-cloud-storage google-cloud-platform google-cloud-cdn
我想以编程方式将文件从 Digital Ocean Storage 迁移到 Google Cloud Storage,而不使用 rclone。
我知道驻留在数字海洋存储 (DOS) 中的确切位置文件,并且我有 Google 云存储 (GCS) 的签名 URL。
如何修改以下代码,以便将 DOS 文件直接复制到 GCS 中,而无需中间下载到我的计算机?
def upload_to_gcs_bucket(blob_name, path_to_file, bucket_name):
""" Upload data to a bucket"""
# Explicitly use service account credentials by specifying the private key
# file.
storage_client = storage.Client.from_service_account_json(
'creds.json')
#print(buckets = list(storage_client.list_buckets())
bucket = storage_client.get_bucket(bucket_name)
blob = bucket.blob(blob_name)
blob.upload_from_filename(path_to_file)
#returns a public url
return blob.public_url
Run Code Online (Sandbox Code Playgroud) python google-cloud-storage digital-ocean google-cloud-platform digital-ocean-spaces
django ×2
app.yaml ×1
docker ×1
dockerfile ×1
ffmpeg ×1
ffprobe ×1
python ×1
reactjs ×1
stackdriver ×1