-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
dagster-cloud-action/gitlab/hybrid-ci.yml
Lines 56 to 66 in 71ea967
| before_script: | |
| # # For Gitlab Container Registry | |
| # - echo $CI_JOB_TOKEN | docker login --username $CI_REGISTRY_USER --password-stdin $REGISTRY_URL | |
| # # For DockerHub | |
| # - echo $DOCKERHUB_TOKEN | docker login --username $DOCKERHUB_USERNAME --password-stdin $REGISTRY_URL | |
| # # For AWS Elastic Container Registry (ECR) | |
| # - apk add --no-cache curl jq python3 py3-pip | |
| # - pip install awscli | |
| # - echo $AWS_ECR_PASSWORD | docker login --username AWS --password-stdin $IMAGE_REGISTRY | |
| # # For Google Container Registry (GCR) | |
| # - echo $GCR_JSON_KEY | docker login --username _json_key --password-stdin $REGISTRY_URL |
These lines right here are problematic because when running pip install awscli, it installs right into root causing the following failure:
$ pip install awscli
error: externally-managed-environment
× This environment is externally managed
╰─>
The system-wide python installation should be maintained using the system
package manager (apk) only.
If the package in question is not packaged already (and hence installable via
"apk add py3-somepackage"), please consider installing it inside a virtual
environment, e.g.:
python3 -m venv /path/to/venv
. /path/to/venv/bin/activate
pip install mypackage
To exit the virtual environment, run:
deactivate
The virtual environment is not deleted, and can be re-entered by re-sourcing
the activate file.
To automatically manage virtual environments, consider using pipx (from the
pipx package).
Hacking through it by allowing system packages to break yields an error when building awscrt:
$ pip install awscli --break-system-packages
....
File "<string>", line 263, in run
File "<string>", line 255, in _build_dependencies
File "<string>", line 163, in _build_dependencies_impl
File "<string>", line 121, in get_cmake_path
Exception: CMake must be installed to build from source.
[end of output]
An alternative could be to just use apk add aws-cli rather than installing through pypi. That lets you skip the python install entirely. Lines 62-63 then just become the following:
- apk add --no-cache curl jq aws-cliReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels