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

feat: Update to use mg5_aMC v2.8.0 #2

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
repository: matthewfeickert/madgraph5-amc-nlo
dockerfile: Dockerfile
tags: latest,mg5_amc2.7.0,mg5_amc2.7.0-python3
tags: latest,mg5_amc2.7.3,mg5_amc2.7.3-python3
- name: Build and Publish to Registry with Release Tag
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v1
Expand All @@ -31,5 +31,5 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
repository: matthewfeickert/madgraph5-amc-nlo
dockerfile: Dockerfile
tags: latest,latest-stable,mg5_amc2.7.0,mg5_amc2.7.0-python3
tags: latest,latest-stable,mg5_amc2.7.3,mg5_amc2.7.3-python3
tag_with_ref: true
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ RUN mkdir /code && \
rm -rf /code

# Install MadGraph5_aMC@NLO for Python 3
ARG MG_VERSION=2.7.0
ARG MG_VERSION=2.7.3
RUN cd /usr/local && \
wget -q https://launchpad.net/mg5amcnlo/python3/py3.0.2/+download/MG5_aMC_v${MG_VERSION}.py3.tar.gz && \
wget -q https://launchpad.net/mg5amcnlo/2.0/2.7.x/+download/MG5_aMC_v${MG_VERSION}.py3.tar.gz && \
tar xzf MG5_aMC_v${MG_VERSION}.py3.tar.gz && \
rm MG5_aMC_v${MG_VERSION}.py3.tar.gz

Expand All @@ -102,7 +102,7 @@ RUN export SED_RANGE="$(($(sed -n '\|enable bash completion in interactive shell
# chown -R --from=root docker /usr/local

## Move files someplace
#RUN cp -r /usr/local/MG5_aMC_v2_7_2 /home/docker/ && \
#RUN cp -r /usr/local/MG5_aMC_v2_7_3 /home/docker/ && \
# chown -R --from=root docker /home/docker

# Use C.UTF-8 locale to avoid issues with ASCII encoding
Expand All @@ -115,7 +115,7 @@ RUN cp /root/.profile ${HOME}/.profile && \
cp /root/.bashrc ${HOME}/.bashrc && \
echo "" >> ${HOME}/.bashrc && \
echo 'export PATH=${HOME}/.local/bin:$PATH' >> ${HOME}/.bashrc && \
echo 'export PATH=/usr/local/MG5_aMC_v2_7_0_py3/bin:$PATH' >> ${HOME}/.bashrc && \
echo 'export PATH=/usr/local/MG5_aMC_v2_7_3_py3/bin:$PATH' >> ${HOME}/.bashrc && \
python -m pip install --upgrade --no-cache-dir pip setuptools wheel && \
python -m pip install --no-cache-dir six

Expand All @@ -124,7 +124,7 @@ RUN cp /root/.profile ${HOME}/.profile && \
ENV PYTHONPATH=/usr/local/lib:$PYTHONPATH
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
ENV PATH ${HOME}/.local/bin:$PATH
ENV PATH /usr/local/MG5_aMC_v2_7_0_py3/bin:$PATH
ENV PATH /usr/local/MG5_aMC_v2_7_3_py3/bin:$PATH

ENTRYPOINT ["/bin/bash", "-l", "-c"]
CMD ["/bin/bash"]
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ image:
--build-arg FASTJET_VERSION=3.3.4 \
--build-arg LHAPDF_VERSION=6.3.0 \
--build-arg PYTHIA_VERSION=8302 \
--build-arg MG_VERSION=2.7.0 \
--build-arg MG_VERSION=2.7.3 \
-t matthewfeickert/madgraph5-amc-nlo:latest \
-t matthewfeickert/madgraph5-amc-nlo:2.7.0 \
-t matthewfeickert/madgraph5-amc-nlo:2.7.0-python3 \
-t matthewfeickert/madgraph5-amc-nlo:2.7.3 \
-t matthewfeickert/madgraph5-amc-nlo:2.7.3-python3 \
--compress

test:
Expand All @@ -22,5 +22,5 @@ test:
--build-arg FASTJET_VERSION=3.3.4 \
--build-arg LHAPDF_VERSION=6.3.0 \
--build-arg PYTHIA_VERSION=8302 \
--build-arg MG_VERSION=2.7.0 \
--build-arg MG_VERSION=2.7.3 \
-t matthewfeickert/madgraph5-amc-nlo:debug-local
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Docker image for Python 3 compliant [MadGraph5_aMC@NLO](https://launchpad.net/mg

The Docker image contains:

* [MadGraph5_aMC@NLO](https://launchpad.net/mg5amcnlo) `v2.7.0`
* [MadGraph5_aMC@NLO](https://launchpad.net/mg5amcnlo) `v2.7.3`
* Python 3.8
* [FastJet](http://fastjet.fr/) `v3.3.4`
* [LHAPDF](https://lhapdf.hepforge.org/) `v6.3.0`
Expand All @@ -22,13 +22,13 @@ The Docker image contains:
- Use `docker pull` to pull down the image corresponding to the tag. For example:

```
docker pull matthewfeickert/madgraph5-amc-nlo:mg5_amc2.7.0-python3
docker pull matthewfeickert/madgraph5-amc-nlo:mg5_amc2.7.3-python3
```

## Tests

As an example test you can run the [top mass scan example](https://answers.launchpad.net/mg5amcnlo/+faq/2186) in the `tests` directory inside the Docker container by running the following from the top level directory of this repository

```
docker run --rm -v $PWD:$PWD -w $PWD matthewfeickert/madgraph5-amc-nlo:mg5_amc2.7.0-python3 "mg5_aMC tests/test_top_mass_scan.txt"
docker run --rm -v $PWD:$PWD -w $PWD matthewfeickert/madgraph5-amc-nlo:mg5_amc2.7.3-python3 "mg5_aMC tests/test_top_mass_scan.txt"
```