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

fix: Require cabinetry v0.5.1+ #345

Merged

Conversation

matthewfeickert
Copy link
Contributor

Resolves #344

  • cabinetry v0.5.0+ requires pyhf v0.7.x which requires jsonschema>=4.15.0. Use mamba for the install of cabinetry to consolidate as many of the library requirements into a single virtual environment.
  • Perform all mamba clean actions in the same layer as mamba install to help decrease image size.
    • This is only applied to instances in which mamba install is used during the image build. If not, then instances of mamba clean are left in place to avoid noisy diffs that would be cosmetic to the image size.

* cabinetry v0.5.0+ requires pyhf v0.7.0 which requires
  jsonschema>=4.15.0. Use mamba for the install to consolidate as many
  of the library requirements into a single virtual environment.
…tall

* As all files that exist in a Docker RUN layer at build get zipped up
  into the archive for that layer it is necessary to remove them in the
  same layer they were created in help decrease image size if they would
  normally be removed later.
@matthewfeickert
Copy link
Contributor Author

matthewfeickert commented Nov 4, 2022

(As I'm writing this before the CI has a chance to go) I built one of the images locally

docker build -t hub.opensciencegrid.org/coffea-casa/cc-base-centos7:latest -f Dockerfile.cc-base-centos7 .

and looks good to go for what we need:

$ docker run \
    --rm \
    -ti \
    hub.opensciencegrid.org/coffea-casa/cc-base-centos7:latest /bin/bash
+ sed -i -e 's|LocalCluster|LocalCluster|g' /opt/dask/labextension.yaml
+ sed -i -e 's|dask.distributed|dask.distributed|g' /opt/dask/labextension.yaml
+ sed -i -e 's|Local Cluster|Local Cluster|g' /opt/dask/labextension.yaml
+ echo 'CONDOR_HOST = red-condor.unl.edu'
+ echo 'COLLECTOR_NAME = Nebraska T2'
+ echo 'UID_DOMAIN = unl.edu'
+ echo 'SCHEDD_HOST = t3.unl.edu'
+ '[' -e /home/cms-jovyan/environment.yml ']'
+ '[' -e /home/cms-jovyan/environment.yaml ']'
+ echo 'No environment.yml, conda will not install any package.'
No environment.yml, conda will not install any package.
+ '[' -e /home/cms-jovyan/requirements.txt ']'
+ echo 'No requirements.txt, pip will not install any module.'
No requirements.txt, pip will not install any module.
+ '[' '' ']'
+ '[' '' ']'
+ exec /bin/bash
(base) [cms-jovyan@6eac8db7124a ~]$ mamba list | grep "pyhf\|cabinetry\|jsonschema"
cabinetry                 0.5.1              pyhd8ed1ab_0    conda-forge
jsonschema                4.15.0             pyhd8ed1ab_0    conda-forge
pyhf                      0.7.0              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.16.1             pyhd8ed1ab_0    conda-forge
(base) [cms-jovyan@6eac8db7124a ~]$ 

👍

@matthewfeickert
Copy link
Contributor Author

@oshadura this is ready for review now.

@matthewfeickert
Copy link
Contributor Author

@oshadura ping just to get this back on the notification stack. No rush here obviously. :)

@oshadura
Copy link
Member

perfect! many thanks for your contribution!

@oshadura
Copy link
Member

failure is unrelated, I will fix CI later in a different PR.

@oshadura oshadura merged commit 6007aaf into CoffeaTeam:master Nov 17, 2022
@matthewfeickert matthewfeickert deleted the fix/require-cabinetry-v0-5-0-pluss branch November 17, 2022 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update cabinetry & pyhf in cc docker images
2 participants