From 2d3a5e47f34ac4b01e72cee5c5e8a8bc7a1f5da4 Mon Sep 17 00:00:00 2001 From: "Marcel R." Date: Tue, 21 May 2024 11:04:58 +0200 Subject: [PATCH 1/5] Fix 3.7 image, add 3.12 image. --- .github/workflows/deploy_images.yml | 24 +++++++++++++++++-- .github/workflows/lint_and_test.yml | 1 + README.md | 3 ++- docker/Dockerfile_312 | 37 +++++++++++++++++++++++++++++ requirements_dev.txt | 3 ++- 5 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 docker/Dockerfile_312 diff --git a/.github/workflows/deploy_images.yml b/.github/workflows/deploy_images.yml index bdc109a..af5ff43 100644 --- a/.github/workflows/deploy_images.yml +++ b/.github/workflows/deploy_images.yml @@ -20,6 +20,7 @@ on: - py310 - py311 - py311-cuda + - py312 - example platforms: @@ -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 🛎️ @@ -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: diff --git a/.github/workflows/lint_and_test.yml b/.github/workflows/lint_and_test.yml index 30f2ce0..f9201ea 100644 --- a/.github/workflows/lint_and_test.yml +++ b/.github/workflows/lint_and_test.yml @@ -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"} diff --git a/README.md b/README.md index 000cacb..d2c3910 100644 --- a/README.md +++ b/README.md @@ -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) | ✘ | @@ -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 diff --git a/docker/Dockerfile_312 b/docker/Dockerfile_312 new file mode 100644 index 0000000..fee24ff --- /dev/null +++ b/docker/Dockerfile_312 @@ -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"] diff --git a/requirements_dev.txt b/requirements_dev.txt index 0ab122d..4909a4c 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -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 From 385041c677991610fb5f5a81f322a6533a7a7f25 Mon Sep 17 00:00:00 2001 From: "Marcel R." Date: Tue, 21 May 2024 11:25:37 +0200 Subject: [PATCH 2/5] [ci skip] Fix dev requirements. --- .github/workflows/deploy_images.yml | 20 ++++++++++---------- requirements_dev.txt | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy_images.yml b/.github/workflows/deploy_images.yml index af5ff43..eb127f7 100644 --- a/.github/workflows/deploy_images.yml +++ b/.github/workflows/deploy_images.yml @@ -21,7 +21,7 @@ on: - py311 - py311-cuda - py312 - - example + - docs platforms: description: Platforms to build for @@ -34,7 +34,7 @@ on: jobs: py37: - if: ${{ github.event.inputs.specific_job == 'all' || contains(github.event.inputs.specific_job, 'py37') }} + if: ${{ github.event.inputs.specific_job == 'all' || github.event.inputs.specific_job == 'py37' }} runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -53,7 +53,7 @@ jobs: push_image: ${{ github.event.inputs.push_image == 'true' }} py38: - if: ${{ github.event.inputs.specific_job == 'all' || contains(github.event.inputs.specific_job, 'py38') }} + if: ${{ github.event.inputs.specific_job == 'all' || github.event.inputs.specific_job == 'py38' }} runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -72,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') || contains(github.event.inputs.specific_job, 'docs') }} + if: ${{ github.event.inputs.specific_job == 'all' || github.event.inputs.specific_job == 'py39' || github.event.inputs.specific_job == 'docs' }} runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -91,7 +91,7 @@ jobs: push_image: ${{ github.event.inputs.push_image == 'true' }} py39_base: - if: ${{ github.event.inputs.specific_job == 'all' || contains(github.event.inputs.specific_job, 'py39') }} + if: ${{ github.event.inputs.specific_job == 'all' || github.event.inputs.specific_job == 'py39' }} runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -110,7 +110,7 @@ jobs: push_image: ${{ github.event.inputs.push_image == 'true' }} py310: - if: ${{ github.event.inputs.specific_job == 'all' || contains(github.event.inputs.specific_job, 'py310') }} + if: ${{ github.event.inputs.specific_job == 'all' || github.event.inputs.specific_job == 'py310' }} runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -129,7 +129,7 @@ jobs: push_image: ${{ github.event.inputs.push_image == 'true' }} py311: - if: ${{ github.event.inputs.specific_job == 'all' || contains(github.event.inputs.specific_job, 'py311') }} + if: ${{ github.event.inputs.specific_job == 'all' || github.event.inputs.specific_job == 'py311' }} runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -148,7 +148,7 @@ jobs: push_image: ${{ github.event.inputs.push_image == 'true' }} py311-cuda: - if: ${{ github.event.inputs.specific_job == 'all' || contains(github.event.inputs.specific_job, 'py311-cuda') }} + if: ${{ github.event.inputs.specific_job == 'all' || github.event.inputs.specific_job == 'py311-cuda' }} runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -168,7 +168,7 @@ jobs: push_image: ${{ github.event.inputs.push_image == 'true' }} py312: - if: ${{ github.event.inputs.specific_job == 'all' || contains(github.event.inputs.specific_job, 'py312') }} + if: ${{ github.event.inputs.specific_job == 'all' || github.event.inputs.specific_job == 'py312' }} runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -187,7 +187,7 @@ jobs: 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, 'docs')) }} + if: ${{ github.event.inputs.push_image == 'true' && (github.event.inputs.specific_job == 'all' || github.event.inputs.specific_job == 'docs') }} needs: py39 runs-on: ubuntu-latest steps: diff --git a/requirements_dev.txt b/requirements_dev.txt index 4909a4c..0dd3303 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -2,5 +2,5 @@ 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 -pytest-xdist~=3.4.0 +pytest-cov~=5.0.0;python_version>="3.8" +pytest-xdist~=3.4.0;python_version>="3.8" From d347fa1e7d0449849973a7532ab12d11f935f830 Mon Sep 17 00:00:00 2001 From: "Marcel R." Date: Tue, 21 May 2024 11:37:29 +0200 Subject: [PATCH 3/5] [ci skip] Update docker files. --- docker/Dockerfile_310 | 2 +- docker/Dockerfile_311 | 2 +- docker/Dockerfile_311_cuda | 34 +++++++++++++++++----------------- docker/Dockerfile_312 | 2 +- docker/Dockerfile_37 | 2 +- docker/Dockerfile_38 | 2 +- docker/Dockerfile_39 | 2 +- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docker/Dockerfile_310 b/docker/Dockerfile_310 index 3fb5112..dda3822 100644 --- a/docker/Dockerfile_310 +++ b/docker/Dockerfile_310 @@ -8,7 +8,7 @@ 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 pip setuptools wheel RUN pip install --no-cache-dir --upgrade ipython RUN pip install --no-cache-dir numpy RUN pip install --no-cache-dir scipy diff --git a/docker/Dockerfile_311 b/docker/Dockerfile_311 index 64b8ca7..d49c504 100644 --- a/docker/Dockerfile_311 +++ b/docker/Dockerfile_311 @@ -8,7 +8,7 @@ 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 pip setuptools wheel RUN pip install --no-cache-dir --upgrade ipython RUN pip install --no-cache-dir numpy RUN pip install --no-cache-dir scipy diff --git a/docker/Dockerfile_311_cuda b/docker/Dockerfile_311_cuda index 5988d01..1a347ae 100644 --- a/docker/Dockerfile_311_cuda +++ b/docker/Dockerfile_311_cuda @@ -5,26 +5,26 @@ WORKDIR /root # minimal software stack RUN apt-get update; apt-get clean -RUN apt-get install -y nano less htop git; 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 pip setuptools wheel RUN pip install --no-cache-dir --upgrade ipython -RUN pip install --no-cache-dir \ - numpy \ - scipy \ - matplotlib \ - pandas \ - numexpr \ - jupyterlab \ - notebook \ - scikit-learn \ - scikit-optimize \ - xgboost \ - scinum \ - nvidia_smi \ - py3nvml \ - torch +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 && \ diff --git a/docker/Dockerfile_312 b/docker/Dockerfile_312 index fee24ff..b9f5a05 100644 --- a/docker/Dockerfile_312 +++ b/docker/Dockerfile_312 @@ -8,7 +8,7 @@ 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 pip setuptools wheel RUN pip install --no-cache-dir --upgrade ipython RUN pip install --no-cache-dir numpy RUN pip install --no-cache-dir scipy diff --git a/docker/Dockerfile_37 b/docker/Dockerfile_37 index fa6de36..c0918e7 100644 --- a/docker/Dockerfile_37 +++ b/docker/Dockerfile_37 @@ -8,7 +8,7 @@ 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 pip setuptools wheel RUN pip install --no-cache-dir --upgrade ipython RUN pip install --no-cache-dir numpy RUN pip install --no-cache-dir scipy diff --git a/docker/Dockerfile_38 b/docker/Dockerfile_38 index e1e96db..4e449c3 100644 --- a/docker/Dockerfile_38 +++ b/docker/Dockerfile_38 @@ -8,7 +8,7 @@ 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 pip setuptools wheel RUN pip install --no-cache-dir --upgrade ipython RUN pip install --no-cache-dir numpy RUN pip install --no-cache-dir scipy diff --git a/docker/Dockerfile_39 b/docker/Dockerfile_39 index d78f27a..8b125f7 100644 --- a/docker/Dockerfile_39 +++ b/docker/Dockerfile_39 @@ -8,7 +8,7 @@ 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 pip setuptools wheel RUN pip install --no-cache-dir --upgrade ipython RUN pip install --no-cache-dir numpy RUN pip install --no-cache-dir scipy From 60293d8ea2bcd5a4cbf347cef9609306e9232ac1 Mon Sep 17 00:00:00 2001 From: "Marcel R." Date: Tue, 21 May 2024 12:35:36 +0200 Subject: [PATCH 4/5] Tweak images. --- docker/Dockerfile_310 | 2 +- docker/Dockerfile_311 | 2 +- docker/Dockerfile_311_cuda | 2 +- docker/Dockerfile_312 | 2 +- docker/Dockerfile_37 | 2 +- docker/Dockerfile_38 | 2 +- docker/Dockerfile_39 | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docker/Dockerfile_310 b/docker/Dockerfile_310 index dda3822..8ef5056 100644 --- a/docker/Dockerfile_310 +++ b/docker/Dockerfile_310 @@ -29,7 +29,7 @@ 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] && \ + pip install --no-cache-dir --upgrade .[dev] && \ cd .. && \ rm -rf cmsml diff --git a/docker/Dockerfile_311 b/docker/Dockerfile_311 index d49c504..071a12d 100644 --- a/docker/Dockerfile_311 +++ b/docker/Dockerfile_311 @@ -29,7 +29,7 @@ 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] && \ + pip install --no-cache-dir --upgrade .[dev] && \ cd .. && \ rm -rf cmsml diff --git a/docker/Dockerfile_311_cuda b/docker/Dockerfile_311_cuda index 1a347ae..1656737 100644 --- a/docker/Dockerfile_311_cuda +++ b/docker/Dockerfile_311_cuda @@ -29,7 +29,7 @@ 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] && \ + pip install --no-cache-dir --upgrade .[dev] && \ cd .. && \ rm -rf cmsml diff --git a/docker/Dockerfile_312 b/docker/Dockerfile_312 index b9f5a05..5f650c5 100644 --- a/docker/Dockerfile_312 +++ b/docker/Dockerfile_312 @@ -29,7 +29,7 @@ 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] && \ + pip install --no-cache-dir --upgrade .[dev] && \ cd .. && \ rm -rf cmsml diff --git a/docker/Dockerfile_37 b/docker/Dockerfile_37 index c0918e7..9bc65b9 100644 --- a/docker/Dockerfile_37 +++ b/docker/Dockerfile_37 @@ -29,7 +29,7 @@ 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] && \ + pip install --no-cache-dir --upgrade .[dev] && \ cd .. && \ rm -rf cmsml diff --git a/docker/Dockerfile_38 b/docker/Dockerfile_38 index 4e449c3..695eb2f 100644 --- a/docker/Dockerfile_38 +++ b/docker/Dockerfile_38 @@ -29,7 +29,7 @@ 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] && \ + pip install --no-cache-dir --upgrade .[dev] && \ cd .. && \ rm -rf cmsml diff --git a/docker/Dockerfile_39 b/docker/Dockerfile_39 index 8b125f7..a488d64 100644 --- a/docker/Dockerfile_39 +++ b/docker/Dockerfile_39 @@ -29,7 +29,7 @@ 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] && \ + pip install --no-cache-dir --upgrade .[dev] && \ cd .. && \ rm -rf cmsml From 4355855da9d421a93530425811b1902b8fe6a6a8 Mon Sep 17 00:00:00 2001 From: "Marcel R." Date: Tue, 21 May 2024 16:00:09 +0200 Subject: [PATCH 5/5] Install cmsml from local copy. --- .github/actions/build-image/action.yml | 2 +- docker/Dockerfile_310 | 9 +++------ docker/Dockerfile_311 | 9 +++------ docker/Dockerfile_311_cuda | 9 +++------ docker/Dockerfile_312 | 9 +++------ docker/Dockerfile_37 | 9 +++------ docker/Dockerfile_38 | 9 +++------ docker/Dockerfile_39 | 9 +++------ 8 files changed, 22 insertions(+), 43 deletions(-) diff --git a/.github/actions/build-image/action.yml b/.github/actions/build-image/action.yml index efa0aba..34cc486 100644 --- a/.github/actions/build-image/action.yml +++ b/.github/actions/build-image/action.yml @@ -41,7 +41,7 @@ runs: - name: Build and deploy image 🐳 uses: docker/build-push-action@v5 with: - context: docker + context: . file: ${{ inputs.docker_file }} platforms: ${{ inputs.platforms }} push: ${{ inputs.push_image }} diff --git a/docker/Dockerfile_310 b/docker/Dockerfile_310 index 8ef5056..5a54309 100644 --- a/docker/Dockerfile_310 +++ b/docker/Dockerfile_310 @@ -26,12 +26,9 @@ 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 --upgrade .[dev] && \ - cd .. && \ - rm -rf cmsml +# copy and install +COPY . /cmsml +RUN pip install --no-cache-dir --upgrade /cmsml[dev] && rm -rf /cmsml # initial command CMD ["bash", "-i", "-l"] diff --git a/docker/Dockerfile_311 b/docker/Dockerfile_311 index 071a12d..b098386 100644 --- a/docker/Dockerfile_311 +++ b/docker/Dockerfile_311 @@ -26,12 +26,9 @@ 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 --upgrade .[dev] && \ - cd .. && \ - rm -rf cmsml +# copy and install +COPY . /cmsml +RUN pip install --no-cache-dir --upgrade /cmsml[dev] && rm -rf /cmsml # initial command CMD ["bash", "-i", "-l"] diff --git a/docker/Dockerfile_311_cuda b/docker/Dockerfile_311_cuda index 1656737..a0e0787 100644 --- a/docker/Dockerfile_311_cuda +++ b/docker/Dockerfile_311_cuda @@ -26,12 +26,9 @@ 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 --upgrade .[dev] && \ - cd .. && \ - rm -rf cmsml +# copy and install +COPY . /cmsml +RUN pip install --no-cache-dir --upgrade /cmsml[dev] && rm -rf /cmsml # initial command CMD ["bash", "-i", "-l"] diff --git a/docker/Dockerfile_312 b/docker/Dockerfile_312 index 5f650c5..f2b69e9 100644 --- a/docker/Dockerfile_312 +++ b/docker/Dockerfile_312 @@ -26,12 +26,9 @@ 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 --upgrade .[dev] && \ - cd .. && \ - rm -rf cmsml +# copy and install +COPY . /cmsml +RUN pip install --no-cache-dir --upgrade /cmsml[dev] && rm -rf /cmsml # initial command CMD ["bash", "-i", "-l"] diff --git a/docker/Dockerfile_37 b/docker/Dockerfile_37 index 9bc65b9..fec1da8 100644 --- a/docker/Dockerfile_37 +++ b/docker/Dockerfile_37 @@ -26,12 +26,9 @@ 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 --upgrade .[dev] && \ - cd .. && \ - rm -rf cmsml +# copy and install +COPY . /cmsml +RUN pip install --no-cache-dir --upgrade /cmsml[dev] && rm -rf /cmsml # initial command CMD ["bash", "-i", "-l"] diff --git a/docker/Dockerfile_38 b/docker/Dockerfile_38 index 695eb2f..9275d51 100644 --- a/docker/Dockerfile_38 +++ b/docker/Dockerfile_38 @@ -26,12 +26,9 @@ 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 --upgrade .[dev] && \ - cd .. && \ - rm -rf cmsml +# copy and install +COPY . /cmsml +RUN pip install --no-cache-dir --upgrade /cmsml[dev] && rm -rf /cmsml # initial command CMD ["bash", "-i", "-l"] diff --git a/docker/Dockerfile_39 b/docker/Dockerfile_39 index a488d64..d0dd435 100644 --- a/docker/Dockerfile_39 +++ b/docker/Dockerfile_39 @@ -26,12 +26,9 @@ 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 --upgrade .[dev] && \ - cd .. && \ - rm -rf cmsml +# copy and install +COPY . /cmsml +RUN pip install --no-cache-dir --upgrade /cmsml[dev] && rm -rf /cmsml # initial command CMD ["bash", "-i", "-l"]