Skip to content

Commit

Permalink
create-env: Rebuild with newer buildah, base, deps
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Bargull <[email protected]>
  • Loading branch information
mbargull committed Jun 2, 2024
1 parent 4ad31ac commit 680a16e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
32 changes: 28 additions & 4 deletions .github/workflows/create-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ on:
jobs:
build:
name: Build & Push
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
container:
# travier/podman-action contains newer podman/buildah versions.
image: quay.io/travier/podman-action
options: --privileged
env:
MAJOR_VERSION: 3
MINOR_VERSION: 0
Expand All @@ -24,9 +28,29 @@ jobs:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
run: |
podman run --rm --privileged \
docker.io/tonistiigi/binfmt --install arm64
- name: Install Tools
run: |
set -eu
# jq is not installed in travier/podman-action
dnf install -qy \
jq
rpm -q \
buildah podman \
coreutils findutils sed \
curl jq \
| (
while read -r line ; do
printf %s\\n "${line}"
case "${line}" in (*' not installed'*)
err=1 ;;
esac
done
exit "${err-0}"
)
- name: Prepare
id: prepare
Expand Down
2 changes: 1 addition & 1 deletion images/create-env/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ COPY --from=build_conda /opt/conda /opt/conda
COPY --from=build_conda /opt/conda/env-activate.sh /usr/local/
RUN set -x && \
/usr/local/env-execute \
conda info --all \
conda info --verbose \
&& \
{ set -x && . /usr/local/env-activate.sh && set +x ; } \
&& \
Expand Down
9 changes: 5 additions & 4 deletions images/create-env/install-conda
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ miniconda_boostrap_prefix="$( pwd )/miniconda"
# Only need `strip` executable from binutils. Other binaries from the package
# and especially the "sysroot" dependency is only bloat for this container
# image. (NOTE: The binary needs libgcc-ng which is explicitly added later.)
mamba create --yes \
conda create --yes \
--prefix="${conda_install_prefix}" \
--channel=conda-forge \
binutils
cp -aL "${conda_install_prefix}/bin/strip" ./strip
conda run --prefix="${conda_install_prefix}" strip -- ./strip
mamba remove --yes --all \
conda remove --yes --all \
--prefix="${conda_install_prefix}"

mamba create --yes \
conda create --yes \
--prefix="${conda_install_prefix}" \
--channel=conda-forge \
\
Expand Down Expand Up @@ -115,7 +115,8 @@ conda config \
# NB: Running conda after the .pyc removal will recreate some .pyc files.
# This is intentional as it speeds up conda startup time.
conda list --name=base
conda info --all
conda info --verbose
conda --version
mamba --version
# Make sure we have the requested conda, mamba versions installed.
conda list \
Expand Down

0 comments on commit 680a16e

Please sign in to comment.