diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index 522716f..9711aaf 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -366,6 +366,75 @@ jobs: cd ${context} docker build --progress=plain --platform ${platform} -f ${dockerfile} -t ${container} . + - name: Deploy container + env: + container: "${{ matrix.containers_to_build[1] }}:${{ matrix.tag }}" + run: docker push ${container} + + build_hub_container: + needs: + - setup_shared_matrix + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + tag: + - ${{ github.event.inputs.tag }} + tutorial_dir: + - ${{ github.event.inputs.tutorial_dir }} + docker_os: ${{ fromJson(needs.setup_shared_matrix.outputs.matrix_data).docker_os }} + docker_arch: ${{ fromJson(needs.setup_shared_matrix.outputs.matrix_data).docker_arch }} + containers_to_build: + - ["docker/Dockerfile.hub", "ghcr.io/llnl/reproducible-benchmarking-hub"] + + steps: + - uses: actions/checkout@v4 + with: + submodules: "recursive" + + - name: Remove unneeded stuff to make space for container + uses: jlumbroso/free-disk-space@v1.3.1 + with: + tool-cache: true + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: false + swap-storage: true + + - name: Set up Docker + uses: docker/setup-docker-action@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GHCR + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Pull layers if they exist + env: + container: "${{ matrix.containers_to_build[1] }}:${{ matrix.tag }}" + run: docker pull ${container} || echo "${container} has not yet been pushed" + + - name: Build container + env: + context: ${{ matrix.tutorial_dir }} + dockerfile: ${{ matrix.containers_to_build[0] }} + container: "${{ matrix.containers_to_build[1] }}:${{ matrix.tag }}" + platform: "${{ matrix.docker_os }}/${{ matrix.docker_arch }}" + run: | + cd ${context} + docker build --progress=plain --platform ${platform} -f ${dockerfile} -t ${container} . + - name: Deploy container env: container: "${{ matrix.containers_to_build[1] }}:${{ matrix.tag }}" diff --git a/.github/workflows/test_build_images.yml b/.github/workflows/test_build_images.yml index 2506b94..492a1ee 100644 --- a/.github/workflows/test_build_images.yml +++ b/.github/workflows/test_build_images.yml @@ -360,6 +360,61 @@ jobs: container: "${{ matrix.containers_to_build[1] }}:${{ matrix.tag }}" run: docker pull ${container} || echo "${container} has not yet been pushed" + - name: Build container + env: + context: ${{ matrix.tutorial_dir }} + dockerfile: ${{ matrix.containers_to_build[0] }} + container: "${{ matrix.containers_to_build[1] }}:${{ matrix.tag }}" + platform: "${{ matrix.docker_os }}/${{ matrix.docker_arch }}" + run: | + cd ${context} + docker build --progress=plain --platform ${platform} -f ${dockerfile} -t ${container} . + + build_hub_container: + needs: + - setup_shared_matrix + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + tag: ${{ fromJson(needs.setup_shared_matrix.outputs.matrix_data).tag }} + tutorial_dir: ${{ fromJson(needs.setup_shared_matrix.outputs.matrix_data).tutorial_dir }} + docker_os: ${{ fromJson(needs.setup_shared_matrix.outputs.matrix_data).docker_os }} + docker_arch: ${{ fromJson(needs.setup_shared_matrix.outputs.matrix_data).docker_arch }} + containers_to_build: + - ["docker/Dockerfile.hub", "ghcr.io/llnl/reproducible-benchmarking-hub"] + + steps: + - uses: actions/checkout@v4 + with: + submodules: "recursive" + + - name: Remove unneeded stuff to make space for container + uses: jlumbroso/free-disk-space@v1.3.1 + with: + tool-cache: true + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: false + swap-storage: true + + - name: Set up Docker + uses: docker/setup-docker-action@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Pull layers if they exist + env: + container: "${{ matrix.containers_to_build[1] }}:${{ matrix.tag }}" + run: docker pull ${container} || echo "${container} has not yet been pushed" + - name: Build container env: context: ${{ matrix.tutorial_dir }} diff --git a/2025-HPDC/docker/Dockerfile.hub b/2025-HPDC/docker/Dockerfile.hub new file mode 100644 index 0000000..32247be --- /dev/null +++ b/2025-HPDC/docker/Dockerfile.hub @@ -0,0 +1,3 @@ +FROM jupyterhub/k8s-hub:4.2.0 + +ENV JUPYTERHUB_XSRF_ANONYMOUS_IP_CIDRS="0.0.0.0/0" \ No newline at end of file