Skip to content

Commit

Permalink
Merge pull request #19 from cms-ml/gpu-enabled-image
Browse files Browse the repository at this point in the history
Create Dockerfile_311_cuda
  • Loading branch information
valsdav authored May 16, 2024
2 parents e7d4e77 + 8af6e6f commit 0d16a69
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/deploy_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,26 @@ jobs:
push: ${{ github.event.inputs.skip_push != 'true' }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

py311-cuda:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Build and deploy image 🐳
uses: docker/build-push-action@v1
with:
path: docker
dockerfile: docker/Dockerfile_311_cuda
repository: cmsml/cmsml
tags: "3.11"
push: ${{ github.event.inputs.skip_push != 'true' }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

docs:
needs: py39
runs-on: ubuntu-latest
Expand Down
38 changes: 38 additions & 0 deletions docker/Dockerfile_311_cuda
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM python:3.11

# set the workdir
WORKDIR /root

# minimal software stack
RUN apt-get update; apt-get clean
RUN apt-get install -y nano less htop git; 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 \
scipy \
matplotlib \
pandas \
numexpr \
jupyterlab \
notebook \
scikit-learn \
scikit-optimize \
tensorflow[and-cuda] \
xgboost \
scinum \
nvidia_smi \
py3nvml \
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"]

0 comments on commit 0d16a69

Please sign in to comment.