TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Cloud Run quietly swaps HOME env var in Docker

73 点作者 chanind超过 3 年前

6 条评论

steren超过 3 年前
Cloud Run PM here. Sorry for the inconvenience. This is an issue for which we have a fix, but the fix still needs to roll out (internal bug 154368323 for googlers reading, we&#x27;re still evaluating the best rollout strategy). Until then, I&#x27;ll add it to <a href="https:&#x2F;&#x2F;cloud.google.com&#x2F;run&#x2F;docs&#x2F;issues" rel="nofollow">https:&#x2F;&#x2F;cloud.google.com&#x2F;run&#x2F;docs&#x2F;issues</a>.
评论 #28678790 未加载
评论 #28679665 未加载
评论 #28678173 未加载
justin_oaks超过 3 年前
For those not familiar with Cloud Run, it&#x27;s a Google Cloud service that allows you to run Docker containers without managing the server it runs on.<p><a href="https:&#x2F;&#x2F;cloud.google.com&#x2F;run" rel="nofollow">https:&#x2F;&#x2F;cloud.google.com&#x2F;run</a>
yzmtf2008超过 3 年前
The solution here is to use `$XDG_CACHE_HOME` instead of `$HOME&#x2F;.cache`, which may not be where a user wants their cache to live: <a href="https:&#x2F;&#x2F;specifications.freedesktop.org&#x2F;basedir-spec&#x2F;basedir-spec-latest.html" rel="nofollow">https:&#x2F;&#x2F;specifications.freedesktop.org&#x2F;basedir-spec&#x2F;basedir-...</a>
评论 #28676901 未加载
评论 #28679275 未加载
评论 #28676739 未加载
reilly3000超过 3 年前
As an alternative, don’t use root for Dockerfiles. Ever. It only takes a few lines to create a user, group, and use said user, and closes a whole class of security issues.
评论 #28677039 未加载
评论 #28681281 未加载
评论 #28679979 未加载
评论 #28677229 未加载
评论 #28681204 未加载
wodenokoto超过 3 年前
That sucks.<p>My only advice is, when using this or cloud functions always start by creating a function&#x2F;image that prints all env variables.<p>For cloud functions these changes tremendously between Python version. Also logging changes completely between some Python versions, to the point where upping the runtime causes logs to stop being saved on cloud logging.
评论 #28680471 未加载
cmeacham98超过 3 年前
Does Huggingface not have a way to override the cache directory? I always specify directories like this manually when using docker specifically to avoid issues like the one in TFA.
评论 #28679679 未加载