Gcloud Crashed (OSError): [Errno 2] No Such File Or Directory: '/workspace/env/bin/python3.7'
Solution 1:
Cloud Build is essentially a pipeline of containers applied to a shared file system (/workspace).
The only state that's available to you is through /workspace.
Each step implicitly mounts /workspace.
Your step #0 is mostly redundant. It applies apt to the container image created in step #0 (and may as a side-effect) update the mounted /workspace too but these updates are discarded (except the mutations to /workspace when that step completes. You shouldn't try to update /workspace with e.g. Python module installs that you intend to use in subsequent steps.
I suspect you're installing pytest with the requirements.txt in step #0 but this doesn't correctly apply to step #1's use of pytest. What you should do is create a container that includes pytest so that you can run pytest in this step.
If you discard everything except step #2, it should work (it does for me).
If you wish to run pytest you'll need a container image that includes it so that you can run this isolated step before deployment.
Post a Comment for "Gcloud Crashed (OSError): [Errno 2] No Such File Or Directory: '/workspace/env/bin/python3.7'"