-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tag :latest
is broken when pip3 install
with the last build
#489
Comments
@BlueTogepi This is happening because from version 496.0.0 we have started building the latest docker image with debian-12. The latest debian image (debian-12) comes with python 3.11 instead of python 3.9 (which was default for debian-11). As you mentioned you can use apt-get to install the google-auth with the following command: About out documentation update, yes we recommend migrating to the stable image as it is the most secure gcloud cli docker image. Also it is significantly smaller than the latest image (~560 MB compared to 3.15 GB for latest). The |
@anindyatahsin Thanks for clearing this up! Currently, I'm trying to migrate to Here's my current cloudbuild.yaml: steps:
- id: 'python-exec'
name: gcr.io/google.com/cloudsdktool/google-cloud-cli:497.0.0-stable
entrypoint: bash
args:
- -c
- >-
./example.py
env:
- 'APT_PACKAGES="python3-google-auth python3-requests"' and here's my current example.py (I've already #!/usr/bin/env python3
import google.auth
import requests I've already tried using
and it was always the same I'm not sure if it is either from the Please note that the cloudbuild log does not show anything about installing apt-get packages; whereas when I tried running with docker run --rm -it -e APT_PACKAGES="python3-google-auth python3-requests" gcr.io/google.com/cloudsdktool/google-cloud-cli:497.0.0-stable python3 on my local computer, it does show a lot of debian libs installation and was working as expected. Also, would you mind adding examples for using this image inside a cloudbuild step in the documentation? There are only |
Hi
With the last build, the command
pip3 install xxx
can't seem to install system-wide library, I'm not sure if this is intended or not.Here's my cloudbuild.yaml:
And here's my
example.py
python script:which will throw out
ModuleNotFoundError: No module named 'google'
error.Here's the full cloudbuild error log:
I know that either
apt install
-ing or using an environment manager as suggested would work, but I don't believe this breaking change is intentional.Also, is the gcp document updated recently? I've noticed it is recommended to migrate to
:stable
, and if I'm to migrate as suggested, are all python packages from public pypi accessible fromCOMPONENTS
env variables?The text was updated successfully, but these errors were encountered: