Skip to content

Commit

Permalink
Upgrade ROOT/YODA and remove requirements.txt
Browse files Browse the repository at this point in the history
* Upgrade to latest ROOT v6.28.04 Docker image (with Python 3.10).
* Install YODA preview release v2.0.0alpha instead of v1.8.3.
* Remove requirements.txt with "hepdata-converter" Python dependencies.
* Update README.md to replace mentions of Travis CI by GitHub Actions.
  • Loading branch information
GraemeWatt committed Oct 17, 2023
1 parent 9d7f666 commit 69c45fb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Continuous Integration
on:
push:
pull_request:
branches: [ master ]
branches: [ main ]
release:
types: [ published ]

Expand All @@ -18,7 +18,7 @@ jobs:
- name: Build the Docker image
run: docker build . --file Dockerfile --tag hepdata-converter
- name: Deploy
if: contains(github.ref, 'master') || github.event_name == 'release'
if: contains(github.ref, 'main') || github.event_name == 'release'
env:
CI_TAG: ${{ github.event.release.tag_name }}
IMAGE_NAME: hepdata-converter
Expand Down
10 changes: 3 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Based on ROOT project's ubuntu image which uses python3.8
FROM rootproject/root:6.22.02-ubuntu20.04
# Based on ROOT project's Ubuntu image which uses Python 3.10
FROM rootproject/root:6.28.04-ubuntu22.04

ENV YODA_VERSION 1.8.3

COPY requirements.txt /tmp/requirements.txt
ENV YODA_VERSION 2.0.0alpha

RUN apt-get -y update && apt-get install -y \
git \
Expand All @@ -22,6 +20,4 @@ libyaml-dev

RUN /bin/bash -c "source /root/.bashrc && cd /tmp && wget -O YODA-$YODA_VERSION.tar.gz https://yoda.hepforge.org/downloads/?f=YODA-$YODA_VERSION.tar.gz && tar -xzf YODA-$YODA_VERSION.tar.gz && cd YODA-$YODA_VERSION && PYTHON=/usr/bin/python3 ./configure --disable-root && make -j4 && make -j4 install && cd ../"

RUN pip3 install -r /tmp/requirements.txt && rm /tmp/requirements.txt

ENV LD_LIBRARY_PATH /usr/local/lib
30 changes: 11 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

[![GitHub Actions Status](https://github.com/HEPData/hepdata-converter-docker/workflows/Continuous%20Integration/badge.svg?branch=master)](https://github.com/HEPData/hepdata-converter-docker/actions?query=branch%3Amaster)
[![GitHub Actions Status](https://github.com/HEPData/hepdata-converter-docker/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/HEPData/hepdata-converter-docker/actions?query=branch%3Amain)
[![Docker Pulls](https://img.shields.io/docker/pulls/hepdata/hepdata-converter)](https://hub.docker.com/r/hepdata/hepdata-converter)

# hepdata-converter-docker

**Build system for creating Docker image used by Travis CI testing framework for hepdata-converter**
**Build system for creating Docker image used by GitHub Actions CI testing framework for hepdata-converter**

This is a *companion repository* for the
[hepdata-converter](https://github.com/HEPData/hepdata-converter)
Expand All @@ -14,34 +14,26 @@ repository (it is also included there as a submodule in the
This repository has only one purpose: to separate the `Dockerfile` from the
main [hepdata-converter](https://github.com/HEPData/hepdata-converter)
repository, in order to automate building Docker images with the help of
[Travis CI](https://travis-ci.org/HEPData/hepdata-converter-docker) and
[GitHub Actions](https://github.com/HEPData/hepdata-converter-docker/actions) and
then pushing them to
[DockerHub](https://hub.docker.com/r/hepdata/hepdata-converter).
[Docker Hub](https://hub.docker.com/r/hepdata/hepdata-converter).

The Docker image `hepdata-converter` contains the
[ROOT](https://root.cern.ch) and [YODA](https://yoda.hepforge.org/)
dependencies needed for running the
[hepdata-converter](https://github.com/HEPData/hepdata-converter) code.
[hepdata-converter](https://github.com/HEPData/hepdata-converter) code,
but **not** the `hepdata-converter` package itself.

The basic workflow is as follows:

1. Modify `Dockerfile` / `requirements.txt` (or any other files).
1. Modify `Dockerfile` (or any other files).
2. Commit it to the repository.
3. Push the code.
4. Travis will create a Docker image from the `Dockerfile` and upload
it to [DockerHub](https://hub.docker.com/r/hepdata/hepdata-converter).
4. GitHub Actions will create a Docker image from the `Dockerfile` and upload
it to [Docker Hub](https://hub.docker.com/r/hepdata/hepdata-converter).

## For developers

This repository contains a file `requirements.txt`. It is here on
purpose and should not be duplicated in the
[hepdata-converter](https://github.com/HEPData/hepdata-converter)
repository. Also
[Travis CI](https://travis-ci.org/HEPData/hepdata-converter-docker)
already has DockerHub credentials in its encrypted variables. If
credentials are ever changed, update the secure variables in the Travis
CI build, otherwise the Docker image will be created but not uploaded.

**Warning:** any build on the master branch (or a tagged release) will
trigger upload of the new Docker image to DockerHub, so be cautious
**Warning:** any build on the main branch (or a tagged release) will
trigger upload of the new Docker image to Docker Hub, so be cautious
about it, especially if you plan to start breaking things.
3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

0 comments on commit 69c45fb

Please sign in to comment.