Skip to content

Commit

Permalink
Fix 3.7 image, add 3.12 image.
Browse files Browse the repository at this point in the history
  • Loading branch information
riga committed May 21, 2024
1 parent 439a2e6 commit 2d3a5e4
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 4 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/deploy_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
- py310
- py311
- py311-cuda
- py312
- example

platforms:
Expand Down Expand Up @@ -71,7 +72,7 @@ jobs:
push_image: ${{ github.event.inputs.push_image == 'true' }}

py39:
if: ${{ github.event.inputs.specific_job == 'all' || contains(github.event.inputs.specific_job, 'py39') }}
if: ${{ github.event.inputs.specific_job == 'all' || contains(github.event.inputs.specific_job, 'py39') || contains(github.event.inputs.specific_job, 'docs') }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
Expand Down Expand Up @@ -166,8 +167,27 @@ jobs:
tags: cmsml/cmsml:3.11-cuda
push_image: ${{ github.event.inputs.push_image == 'true' }}

py312:
if: ${{ github.event.inputs.specific_job == 'all' || contains(github.event.inputs.specific_job, 'py312') }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Build and deploy image 🐳
uses: ./.github/actions/build-image
with:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
docker_file: docker/Dockerfile_312
platforms: ${{ github.event.inputs.platforms }}
tags: cmsml/cmsml:3.12
push_image: ${{ github.event.inputs.push_image == 'true' }}

docs:
if: ${{ github.event.inputs.push_image == 'true' && (github.event.inputs.specific_job == 'all' || contains(github.event.inputs.specific_job, 'example')) }}
if: ${{ github.event.inputs.push_image == 'true' && (github.event.inputs.specific_job == 'all' || contains(github.event.inputs.specific_job, 'docs')) }}
needs: py39
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- {tag: "3.9", tf: "default"}
- {tag: "3.10", tf: "default"}
- {tag: "3.11", tf: "default"}
- {tag: "3.12", tf: "default"}
# scan tf versions
- {tag: "3.9_base", tf: "2.5.3"}
- {tag: "3.9_base", tf: "2.6.5"}
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ To use the cmsml package via docker, checkout our [DockerHub](https://hub.docker
| `cmsml/cmsml:3.10` | 3.10 | latest (~2.16.1) | latest (~2.3.0) ||
| `cmsml/cmsml:3.11` | 3.11 | latest (~2.16.1) | latest (~2.3.0) ||
| `cmsml/cmsml:3.11-cuda` | 3.11 | latest (~2.16.1) | latest (~2.3.0) | ✔︎ |
| `cmsml/cmsml:3.12` | 3.12 | latest (~2.16.1) | latest (~2.3.0) ||

<!-- marker-after-docker -->

Expand All @@ -74,7 +75,7 @@ The tests can be triggered with
pytest -n auto tests
```

and in general, they should be run for Python 3.7 to 3.11.
and in general, they should be run for Python 3.7 to 3.12.
To run tests in a docker container, do

```shell
Expand Down
37 changes: 37 additions & 0 deletions docker/Dockerfile_312
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM python:3.12

# set the workdir
WORKDIR /root

# minimal software stack
RUN apt-get update; apt-get clean
RUN apt-get install -y nano less htop git libhdf5-serial-dev; apt-get clean

# python software stack
RUN pip install --no-cache-dir --upgrade pip setuptools
RUN pip install --no-cache-dir --upgrade ipython
RUN pip install --no-cache-dir numpy
RUN pip install --no-cache-dir scipy
RUN pip install --no-cache-dir matplotlib
RUN pip install --no-cache-dir pandas
RUN pip install --no-cache-dir numexpr
RUN pip install --no-cache-dir jupyterlab
RUN pip install --no-cache-dir notebook
RUN pip install --no-cache-dir scikit-learn
RUN pip install --no-cache-dir scikit-optimize
RUN pip install --no-cache-dir tensorflow
RUN pip install --no-cache-dir xgboost
RUN pip install --no-cache-dir scinum
RUN pip install --no-cache-dir nvidia_smi
RUN pip install --no-cache-dir py3nvml
RUN pip install --no-cache-dir torch

# install cmsml from master
RUN git clone https://github.com/cms-ml/cmsml.git && \
cd cmsml && \
pip install --no-cache-dir .[dev] && \
cd .. && \
rm -rf cmsml

# initial command
CMD ["bash", "-i", "-l"]
3 changes: 2 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
flake8~=7.0
flake8~=7.0.0;python_version>="3.8"
flake8~=5.0.0;python_version<"3.8"
flake8-commas~=2.1.0
flake8-quotes~=3.3.2
pytest-cov~=5.0.0
Expand Down

0 comments on commit 2d3a5e4

Please sign in to comment.