Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnaa423 committed Jul 8, 2024
0 parents commit 8637a1d
Show file tree
Hide file tree
Showing 8 changed files with 948 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Dockerfile_bare
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM ubuntu:22.04

# Platform.
ARG PLATFORM="Linux-x86_64"
# ARG PLATFORM="MacOSX-arm64"
# ARG PLATFORM="Linux-ppc64le"

# Shell.
ENV SHELL=/bin/bash
ENV BASH_ENV=~/.bashrc
SHELL ["/bin/bash", "-c"]

# Working directory.
RUN mkdir -p /app
WORKDIR /app

# Install basics.
RUN apt update && apt install -y wget build-essential git

# For slient installation.
RUN wget -O miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-${PLATFORM}.sh \
&& chmod u+x ./miniconda.sh \
&& ./miniconda.sh -b -p $HOME/miniconda \
&& rm -rf ./miniconda.sh \
&& echo "$HOME/miniconda/bin/conda init" > ~/.bashrc

# Configure conda-forge and mamba.
RUN source ~/.bashrc \
&& conda config --add channels conda-forge && conda config --set channel_priority strict \
&& conda install -y mamba

CMD ["/bin/bash"]
87 changes: 87 additions & 0 deletions Dockerfile_cuda
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
FROM krishnaa42342/mamba:bare


# Platform.
ARG PLATFORM="Linux-x86_64"
# ARG PLATFORM="MacOSX-arm64"
# ARG PLATFORM="Linux-ppc64le"

# Shell.
ENV SHELL=/bin/bash
ENV BASH_ENV=~/.bashrc
SHELL ["/bin/bash", "-c"]

# Working directory.
RUN mkdir -p /app
WORKDIR /app

# Install packages.

RUN source ~/.bashrc \
&& mamba install -y numpy

RUN source ~/.bashrc \
&& mamba install -y cupy

RUN source ~/.bashrc \
&& mamba install -y mpich

RUN source ~/.bashrc \
&& mamba install -y mpi4py

RUN source ~/.bashrc \
&& mamba install -y pandas

RUN source ~/.bashrc \
&& mamba install -y scipy

RUN source ~/.bashrc \
&& mamba install -y sympy

RUN source ~/.bashrc \
&& mamba install -y scikit-learn

RUN source ~/.bashrc \
&& mamba install -y h5py

RUN source ~/.bashrc \
&& mamba install -y petsc petsc4py slepc slepc4py

RUN source ~/.bashrc \
&& mamba install -y matplotlib

RUN source ~/.bashrc \
&& mamba install -y seaborn

RUN source ~/.bashrc \
&& pip3 install -q pyvista

RUN source ~/.bashrc \
&& mamba install -y fenics-dolfinx

RUN source ~/.bashrc \
&& mamba install -y jupyterlab

RUN source ~/.bashrc \
&& mamba install -y ase

RUN source ~/.bashrc \
&& mamba install -y gpaw

RUN source ~/.bashrc \
&& mamba install -y pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia

RUN source ~/.bashrc \
&& pip3 install -q torch_geometric pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv \
-f https://data.pyg.org/whl/torch-2.3.0+cu121.html

RUN source ~/.bashrc \
&& pip3 install -q e3nn

RUN source ~/.bashrc \
&& mamba install -y pymatgen

RUN source ~/.bashrc \
&& pip3 install -q mp_api

CMD ["/bin/bash"]
83 changes: 83 additions & 0 deletions Dockerfile_mpich
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
FROM krishnaa42342/mamba:bare


# Platform.
ARG PLATFORM="Linux-x86_64"
# ARG PLATFORM="MacOSX-arm64"
# ARG PLATFORM="Linux-ppc64le"

# Shell.
ENV SHELL=/bin/bash
ENV BASH_ENV=~/.bashrc
SHELL ["/bin/bash", "-c"]

# Working directory.
RUN mkdir -p /app
WORKDIR /app

# Install packages.

RUN source ~/.bashrc \
&& mamba install -y numpy

RUN source ~/.bashrc \
&& mamba install -y mpich

RUN source ~/.bashrc \
&& mamba install -y mpi4py

RUN source ~/.bashrc \
&& mamba install -y pandas

RUN source ~/.bashrc \
&& mamba install -y scipy

RUN source ~/.bashrc \
&& mamba install -y sympy

RUN source ~/.bashrc \
&& mamba install -y scikit-learn

RUN source ~/.bashrc \
&& mamba install -y h5py

RUN source ~/.bashrc \
&& mamba install -y petsc petsc4py slepc slepc4py

RUN source ~/.bashrc \
&& mamba install -y matplotlib

RUN source ~/.bashrc \
&& mamba install -y seaborn

RUN source ~/.bashrc \
&& pip3 install -q pyvista

RUN source ~/.bashrc \
&& mamba install -y fenics-dolfinx

RUN source ~/.bashrc \
&& mamba install -y jupyterlab

RUN source ~/.bashrc \
&& mamba install -y ase

RUN source ~/.bashrc \
&& mamba install -y gpaw

RUN source ~/.bashrc \
&& mamba install -y pytorch torchvision torchaudio cpuonly -c pytorch

RUN source ~/.bashrc \
&& pip3 install -q torch_geometric

RUN source ~/.bashrc \
&& pip3 install -q e3nn

RUN source ~/.bashrc \
&& mamba install -y pymatgen

RUN source ~/.bashrc \
&& pip3 install -q mp_api

CMD ["/bin/bash"]
3 changes: 3 additions & 0 deletions build_bare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker buildx build --file=Dockerfile_bare --tag=krishnaa42342/mamba:bare --no-cache ./
3 changes: 3 additions & 0 deletions build_cuda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker buildx build --file=Dockerfile_cuda --tag=krishnaa42342/mamba:cuda --no-cache ./
3 changes: 3 additions & 0 deletions build_mpich.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker buildx build --file=Dockerfile_mpich --tag=krishnaa42342/mamba:mpich --no-cache ./
Loading

0 comments on commit 8637a1d

Please sign in to comment.