Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
f4af580
feat: add initial Dockerfile
FinnHering Oct 9, 2024
532dd06
build: change containers to create julea-prebuild containers
FinnHering Oct 9, 2024
0f5ba21
build: add workflow_dispatch trigger for container builds
FinnHering Oct 9, 2024
5be5119
build: add Docker meta step for better tagging/labeling of docker images
FinnHering Oct 9, 2024
55a08be
build(fix): also create latest tag everytime the image is build in th…
FinnHering Oct 9, 2024
bb168ad
chore: use matrix to build containers for multiple platforms
FinnHering Oct 18, 2024
fbbe051
fix(ci): add missing steps in container build step
FinnHering Oct 18, 2024
dd96aa2
fix(ci): bump docker/build-push-action to v6
FinnHering Oct 18, 2024
a4f2572
fix(ci): add env variable
FinnHering Oct 18, 2024
09da695
fix(ci): reference variable properly
FinnHering Oct 18, 2024
9cfd327
fix(ci): move tags/flavor to merge step
FinnHering Oct 18, 2024
c16d33e
fix(ci): add login to ghcr to build step
FinnHering Oct 18, 2024
093a0e8
fix(ci): add missing prep step
FinnHering Oct 18, 2024
975cddd
Revert "fix(ci): add missing prep step"
FinnHering Oct 18, 2024
1b50972
fix(ci): add missing prep step
FinnHering Oct 18, 2024
723aa0b
ci: switch to docker bake for image building
FinnHering Oct 19, 2024
9fe3ed9
fix: add generate
FinnHering Oct 19, 2024
966617a
fix: add buildx/qemu
FinnHering Oct 19, 2024
5a4e98a
ci: push images
FinnHering Oct 19, 2024
8f5d98b
remove platform from matrix
FinnHering Oct 19, 2024
5783820
fix: remove platforms variable reference
FinnHering Oct 19, 2024
afb343e
chore: created docker build/bake system for creation of all required …
FinnHering Oct 20, 2024
1d9d0aa
fix: target name changed
FinnHering Oct 20, 2024
47af160
fix: add missing dependency clang
FinnHering Oct 20, 2024
f81ff92
chore: enable layer cache
FinnHering Oct 21, 2024
87976a6
fix: use proper way to set caching
FinnHering Oct 21, 2024
59fd106
chore: change name of docker tag
FinnHering Oct 21, 2024
0f2bdc1
fix: enable caching workaround.
FinnHering Oct 21, 2024
90f1d5a
chore: bump action version
FinnHering Oct 21, 2024
ccaff7b
chore: use registry caching as gha caching is broken
FinnHering Oct 21, 2024
e558171
fix: remove redundant action step
FinnHering Oct 21, 2024
4199d8e
fix: broken image tag
FinnHering Oct 21, 2024
4e1e5e6
fix: ref must be quoted
FinnHering Oct 21, 2024
24d183b
fix: remove quotes and whitespace
FinnHering Oct 21, 2024
092b2d9
chore: use specific container name for caching
FinnHering Oct 21, 2024
6b92565
chore: use previous builds as cache
FinnHering Oct 21, 2024
3294e36
chore: change tag to be the same as the target name
FinnHering Oct 21, 2024
7bc1b94
fix: image name
FinnHering Oct 21, 2024
becb789
chore: switch back to gha cache
FinnHering Oct 21, 2024
9b0e91a
fix: improve .dockerignore
FinnHering Oct 21, 2024
d20bff1
fix: use scope for hashing
FinnHering Oct 21, 2024
18ece74
chore: rework bake file
FinnHering Oct 21, 2024
96e6060
fix: specify correct stage name
FinnHering Oct 21, 2024
d3241cb
fix: use correct reference
FinnHering Oct 21, 2024
f14d4a8
fix: target name
FinnHering Oct 21, 2024
c8e7f79
Revert "fix: specify correct stage name"
FinnHering Oct 21, 2024
310bd73
Reapply "fix: specify correct stage name"
FinnHering Oct 21, 2024
fab2864
chore: remove target
FinnHering Oct 21, 2024
6685898
fix: latest; add dev-container image
FinnHering Oct 21, 2024
b2ef549
fix: update dockerignore to increase build speed
FinnHering Oct 21, 2024
8ef6bba
add dev container target
FinnHering Oct 22, 2024
3d72016
chore: add arm64 platform
FinnHering Oct 23, 2024
78a5460
chore: remove system build cache
FinnHering Oct 23, 2024
421b674
chore: only target arm64 on devcontainer
FinnHering Oct 23, 2024
165152f
chore: allow for cross compilation
FinnHering Oct 24, 2024
332a928
fix: use targetarch, remove bad ARCH call
FinnHering Oct 24, 2024
4fe9314
fix: variable assignment
FinnHering Oct 24, 2024
752a23f
fix: use TARGETARCH instead of BUILDARCH
FinnHering Oct 24, 2024
7b87c29
fix: install aarch64 buildtools
FinnHering Oct 24, 2024
0eabedb
switch to clang for cross compilation
FinnHering Oct 24, 2024
5b5cf5b
Revert "chore: allow for cross compilation"
FinnHering Oct 24, 2024
e55b2bc
fix: remove arm64 platform because of slow buildtimes
FinnHering Oct 24, 2024
9697faa
chore: pass base_tag and commit_hash variables to bakefile
FinnHering Oct 24, 2024
48d55dc
fix: pass proper variable for base_tag
FinnHering Oct 24, 2024
4b89f31
fix: typo
FinnHering Oct 24, 2024
2fb74ac
ci: move to containers
FinnHering Oct 24, 2024
e96fdbf
fix: remove duplicate compiler concat
FinnHering Oct 24, 2024
4be6677
chore: make buildtype dynamic
FinnHering Oct 24, 2024
3799e02
chore: add devcontainer
FinnHering Oct 25, 2024
de78881
update
FinnHering Jan 12, 2025
08eae41
fix: build julea in separate stage
FinnHering Jan 27, 2025
6f54e6a
fix
FinnHering Jan 27, 2025
ed367b0
fix: add missing copy
FinnHering Jan 27, 2025
f44910a
fix: install missing deps
FinnHering Jan 27, 2025
c42e768
chore: refactor dockerfile
FinnHering Feb 11, 2025
d34fb90
fix: remove sensless RUN
FinnHering Feb 11, 2025
dc154d1
fix: add workdir
FinnHering Feb 11, 2025
9744369
fix: add missing runntime dep python3
FinnHering Feb 11, 2025
2c960c5
fix: change prefix
FinnHering Feb 11, 2025
a58bc61
feat: split runntime deps from build-deps
FinnHering Feb 11, 2025
72ce87c
refactor: remake docker image
FinnHering Feb 14, 2025
bdbd298
fix: wrong command
FinnHering Feb 14, 2025
53369e5
chore: improve dockerfiles
FinnHering Feb 21, 2025
88778f6
fix: rely on dockerignore
FinnHering Feb 21, 2025
8c76390
fix: change prefix and remove install
FinnHering Feb 23, 2025
581b611
fix: readd install command
FinnHering Feb 23, 2025
333a170
chore: add entrypoint
FinnHering Feb 23, 2025
97e6043
fix: make script executable
FinnHering Feb 24, 2025
917dbcd
fix: move entrypoint script out of script directory to improve caching
FinnHering Feb 24, 2025
8e5fb5b
fix: unignore entrypoint script
FinnHering Feb 24, 2025
1870f58
fix: use proper path to environment script
FinnHering Feb 24, 2025
aeeb2fa
fix: fix typo
FinnHering Feb 24, 2025
aafdbd7
fix: add missing LD_LIBRARY_PATH and fix bin path
FinnHering Feb 24, 2025
663accc
fix: add all /lib subdirectories to LD_LIBRARY_PATH
FinnHering Feb 25, 2025
523080a
fix: typo
FinnHering Feb 25, 2025
5d13142
fix: use bld instead of julea-install
FinnHering Feb 25, 2025
b0dec44
refactor: no longer required code
FinnHering Feb 25, 2025
55c26d0
fix: add proper prefix
FinnHering Feb 25, 2025
fdfd611
fix: add missing install
FinnHering Feb 25, 2025
c6fd671
fix: add missing JULEA_PREFIX
FinnHering Feb 25, 2025
e7e3cd7
Update containers.yml
FinnHering Feb 26, 2025
64269b5
fix: set correct target for dev container
FinnHering Apr 17, 2025
74c3d5c
chore: refactor Dockerfiles
FinnHering May 10, 2025
7c9b231
chore: refactor bakefile
FinnHering May 10, 2025
3c07728
fix: add shellecheck annotations
FinnHering May 17, 2025
61f8b2d
ci: remove old container build step
FinnHering May 17, 2025
22ef514
Merge branch 'parcio:master' into master
FinnHering May 17, 2025
481f34e
fix: support platform emulation
FinnHering May 24, 2025
c9808eb
fix: use proper variable name
FinnHering May 24, 2025
85d7c31
chore: use proper registry path
FinnHering May 24, 2025
65dd7ba
fix: use proper tag name add note about cross platform execution
FinnHering Jun 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// QUIRK: For running the AMD64 containers on different platforms (eg. ARM64) do: docker pull --platform=linux/amd64 <IMAGE_TAG> before starting the devcontainer.
// See: https://github.com/microsoft/vscode-remote-release/issues/8965
{
"name": "Julea Dev Container",
"image": "ghcr.io/parcio/julea-dev:latest",
"containerEnv": {
"JULEA_SPACK_DIR": "/app/dependencies"
}
}
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Dependencies folder is not needed in the image (it will be rebuild in there)
dependencies

# Git(-hub) specific
.git
.github

# Ignore Docker related things
Dockerfile*
docker-*

!docker-spack-entrypoint.sh
59 changes: 0 additions & 59 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,65 +77,6 @@ jobs:
JULEA_SPACK_COMPILER: ${{ matrix.os.compiler }}@${{ matrix.os.compiler_version }}
run: |
./scripts/install-dependencies.sh
dependencies-containers:
name: Dependencies (Containers)
runs-on: ubuntu-24.04
container: ${{ matrix.os.registry }}/${{ matrix.os.image }}
timeout-minutes: 180
strategy:
fail-fast: false
matrix:
os:
- image: ubuntu:24.04
registry: docker.io/library
compiler: gcc
compiler_version: 13.2.0
- image: ubuntu:24.04
registry: docker.io/library
compiler: clang
compiler_version: 18.1.3
- image: ubuntu:22.04
registry: docker.io/library
compiler: gcc
compiler_version: 11.4.0
- image: ubuntu:22.04
registry: docker.io/library
compiler: clang
compiler_version: 14.0.0
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
show-progress: false
- name: Install packages
if: ${{ matrix.os.image == 'ubuntu:24.04' || matrix.os.image == 'ubuntu:22.04' }}
run: |
apt update
apt --yes --no-install-recommends install build-essential zstd
apt --yes --no-install-recommends install ca-certificates git gnupg patchelf python3 unzip
if test "${{ matrix.os.compiler }}" = 'clang'
then
apt --yes --no-install-recommends install clang

if test "${{ matrix.os.image }}" = 'ubuntu:24.04'
then
apt --yes --no-install-recommends install libclang-rt-dev
fi
fi
- name: Cache dependencies
id: cache
uses: actions/cache@v4
with:
path: /dependencies
key: ${{ matrix.os.image }}-${{ matrix.os.compiler }}-${{ matrix.os.compiler_version }}-${{ hashFiles('scripts/spack', 'scripts/install-dependencies.sh') }}
- name: Install dependencies
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
env:
JULEA_SPACK_COMPILER: ${{ matrix.os.compiler }}@${{ matrix.os.compiler_version }}
JULEA_SPACK_DIR: /dependencies
run: |
./scripts/install-dependencies.sh
build:
name: Build
needs: dependencies
Expand Down
71 changes: 47 additions & 24 deletions .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,44 +16,67 @@

name: Containers
on:
workflow_dispatch:
push:
branches:
- master
paths:
- '.github/workflows/containers.yml'
- 'containers/*'
pull_request:
branches:
- master
paths:
- '.github/workflows/containers.yml'
- 'containers/*'
schedule:
- cron: '0 0 * * 0'
# pull_request:
# branches:
# - master
workflow_call:
# schedule:
# - cron: '0 0 * * 0'

env:
REGISTRY_BASE: ghcr.io/parcio

jobs:
ubuntu-dev:
name: Ubuntu Development Container
runs-on: ubuntu-24.04
prepare:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.generate.outputs.targets }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: List targets
id: generate
uses: docker/bake-action/subaction/list-targets@v4
with:
target: ubuntu

build-containesr:
name: Build Julea Containers
runs-on: ubuntu-latest
needs:
- prepare
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.prepare.outputs.targets) }}
permissions:
packages: write
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
show-progress: false
- name: Login to GitHub Container Registry
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push to GitHub Container Registry
uses: docker/build-push-action@v5
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and Push
uses: docker/bake-action@v5
env:
COMMIT_SHA: ${{ github.sha }}
BASE_IMAGE_NAME: ${{ env.REGISTRY_BASE }}/julea
with:
context: containers
file: containers/ubuntu-22.04-dev
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/parcio/ubuntu-dev:22.04
targets: ${{ matrix.target }}
push: true
files: |
./docker-bake.hcl
${{ steps.meta.outputs.bake-file }}
60 changes: 60 additions & 0 deletions Dockerfile.spack
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
ARG UBUNTU_VERSION="24.04"

# Stage 0
FROM ubuntu:${UBUNTU_VERSION} AS base
SHELL [ "/bin/bash", "-c" ]
ARG JULEA_SPACK_COMPILER="gcc"
ARG CC="gcc"
ARG BUILDTYPE="release"
WORKDIR /app

FROM base AS julea_runtime_dependencies

RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \
&& apt-get -y install \
python3

FROM julea_runtime_dependencies AS julea_dependencies

RUN DEBIAN_FRONTEND=noninteractive apt-get -y update && apt-get -y upgrade && apt-get -y install \
git \
build-essential \
zstd \
ca-certificates \
git \
gnupg \
patchelf \
unzip \
clang

COPY ./scripts/ /app/scripts
RUN JULEA_SPACK_COMPILER=${JULEA_SPACK_COMPILER} JULEA_SPACK_DIR="/app/dependencies" /app/scripts/install-dependencies.sh


FROM julea_dependencies AS julea_build

COPY ./ /app

RUN . /app/scripts/environment.sh && \
CC=${CC} meson setup --prefix="/app/julea-install" --buildtype=${BUILDTYPE} --werror "-Dgdbm_prefix=$(spack location --install-dir gdbm)" bld && \
ninja -C bld && \
DESTDIR="/" ninja -C bld install

FROM julea_runtime_dependencies AS julea

# Set Environment to support X86 emulators like QEMU (See: https://github.com/spack/spack/issues/41639)
ENV SPACK_ROOT="/app/dependencies/"

COPY --from=julea_build /app/julea-install /app/julea-install
COPY --from=julea_build /app/dependencies /app/dependencies
COPY ./scripts/ /app/scripts/
COPY ./docker-spack-entrypoint.sh /app/docker-spack-entrypoint.sh

ENTRYPOINT [ "/app/docker-spack-entrypoint.sh" ]


FROM julea_dependencies AS julea_dev
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
git \
gdb
65 changes: 65 additions & 0 deletions Dockerfile.system
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
ARG UBUNTU_VERSION="24.04"

FROM ubuntu:${UBUNTU_VERSION} AS base
SHELL [ "/bin/bash", "-c" ]
ARG UBUNTU_VERSION="24.04"
ARG CC="gcc"
ARG BUILDTYPE="release"
WORKDIR /app


FROM base AS julea_runtime_dependencies
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get --yes install \
libglib2.0-dev \
libbson-dev \
libfabric-dev \
libgdbm-dev \
liblmdb-dev \
libsqlite3-dev \
libleveldb-dev \
libmongoc-dev \
libmariadb-dev \
librocksdb-dev \
libfuse3-dev \
libopen-trace-format-dev \
librados-dev


FROM julea_runtime_dependencies AS julea_dependencies
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get --yes install \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
build-essential \
ninja-build \
pkgconf \
python3-pip \
python3-setuptools \
python3-wheel \
clang \
# Install meson with pip if Ubuntu Version is older than 22.04. Otherwise use apt
&& if awk "BEGIN {exit !($UBUNTU_VERSION >= 22.04)}" ; then echo "installing with apt..." && apt-get --yes install meson ; else pip install meson ; fi


FROM julea_dependencies AS julea_build
COPY . /app/

RUN CC=${CC} meson setup --buildtype=${BUILDTYPE} --werror --prefix="/usr/local" bld
RUN ninja -C bld
RUN DESTDIR=/app/julea-install/ ninja -C bld install


FROM julea_runtime_dependencies AS julea
COPY --from=julea_build /app/julea-install/ /
# Required for ld to detect the added libraries
RUN ldconfig


FROM julea_dependencies AS julea_dev
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
git \
gdb
Loading