Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding h5py to Docker images #97

Merged
merged 5 commits into from
Jul 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
33 changes: 23 additions & 10 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
name: Docker build

on: [push]
on:
pull_request:
branches:
- '*'
push:
branches:
- 'main'
tags:
- '*'

env:
GITLAB_CONTAINER_REGISTRY: gitlab-registry.cern.ch/atlas-flavor-tagging-tools/training-images/puma-images

jobs:
build_latest:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:

- name: Checkout
Expand All @@ -20,15 +27,21 @@ jobs:
- name: Login to GitLab container registry
run: docker login gitlab-registry.cern.ch -u ${{ secrets.GITLAB_USERNAME }} -p ${{ secrets.GITLAB_TOKEN }}

- name: Build and push slim image
run: |
docker build -f docker/Dockerfile --tag ${GITLAB_CONTAINER_REGISTRY}/puma:latest .
docker push ${GITLAB_CONTAINER_REGISTRY}/puma:latest
- name: Build slim image
run: docker build -f docker/Dockerfile --tag ${GITLAB_CONTAINER_REGISTRY}/puma:latest .

- name: Build and push dev image
run: |
docker build -f docker/Dockerfile_dev --tag ${GITLAB_CONTAINER_REGISTRY}/puma:latest-dev .
docker push ${GITLAB_CONTAINER_REGISTRY}/puma:latest-dev
# Push this image if this is on the main branch
- name: Push slim image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: docker push ${GITLAB_CONTAINER_REGISTRY}/puma:latest

- name: Build dev image
run: docker build -f docker/Dockerfile_dev --tag ${GITLAB_CONTAINER_REGISTRY}/puma:latest-dev .

# Push this image if this is on the main branch
- name: Push dev image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: docker push ${GITLAB_CONTAINER_REGISTRY}/puma:latest-dev

build_release:
# Build an extra image for tagged commits
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### [Latest]

- Adding `h5py` to the Docker images [#97](https://github.com/umami-hep/puma/pull/97)
- Adding `transparent` attribute to `PlotObject` class. This allows to specify transparent background when initialising the plot [#96](https://github.com/umami-hep/puma/pull/96)

### [v0.1.5]
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ FROM python:3.8-slim
# Copy the current version of the repo in the image
COPY . /puma_repo
# Install and remove the folder afterwards
RUN pip install /puma_repo && rm -rf /puma_repo
RUN pip install /puma_repo && rm -rf /puma_repo
RUN pip install h5py==3.7.0
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ coverage==6.3.1
darglint==1.8.1
flake8==4.0.1
isort==5.10.1
h5py==3.7.0
librep==0.0.5
matplotlib==3.5.1
numpy==1.21.0
Expand Down