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

Dockerize PyBaMM #3223

Merged
merged 47 commits into from
Aug 29, 2023
Merged
Changes from 11 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
520750a
Added Dockerfile
arjxn-py Mar 30, 2023
0521436
Merge branch 'pybamm-team:develop' into DockerizePybamm
arjxn-py May 6, 2023
b757ecc
Merge branch 'pybamm-team:develop' into DockerizePybamm
arjxn-py May 12, 2023
10edb94
Merge branch 'develop' into DockerizePybamm
arjxn-py Aug 2, 2023
94b3358
Update Dockerfile
arjxn-py Aug 2, 2023
ce86eb4
Install git only
arjxn-py Aug 2, 2023
8428308
Install build tools
arjxn-py Aug 2, 2023
c8965d2
Use repo to copy pybamm
arjxn-py Aug 4, 2023
90ae2a9
install odes if args passed
arjxn-py Aug 4, 2023
ed1fb10
install odes if `ODES = true`
arjxn-py Aug 4, 2023
f9d15d3
Install jax if `JAX=true`
arjxn-py Aug 4, 2023
be918c8
Update Dockerfile
arjxn-py Aug 7, 2023
d97a57b
Define `IDAKLU` arg
arjxn-py Aug 7, 2023
5f3f288
Merge branch 'DockerizePybamm' of https://github.com/arjxn-py/PyBaMM …
arjxn-py Aug 7, 2023
3ce9673
Modify for IDAKLU
arjxn-py Aug 8, 2023
96cc0b1
Using python3.9 for IDAKLU
arjxn-py Aug 12, 2023
63337e3
Try using venv
arjxn-py Aug 12, 2023
aa4b83f
Trying python3.11-dev
arjxn-py Aug 12, 2023
9991cbc
Squash previous 3 commits
arjxn-py Aug 12, 2023
83c7df0
Using `ubuntu:22.04` as base image
arjxn-py Aug 12, 2023
89c2ba7
Using `continuumio/miniconda3` as base
arjxn-py Aug 12, 2023
5d35c8e
Create a non-root user to avoid conflicts
arjxn-py Aug 12, 2023
b520197
Again add all ARGS
arjxn-py Aug 12, 2023
2fda58f
edit entrypoint
arjxn-py Aug 12, 2023
701e45f
Start documenting Docker
arjxn-py Aug 12, 2023
a226530
Add initial documentation for docker
arjxn-py Aug 12, 2023
3eca42d
Add `nox` to `[dev]`
arjxn-py Aug 12, 2023
6e481b4
Update Dockerfile
arjxn-py Aug 12, 2023
1a3107e
Squash merge
arjxn-py Aug 12, 2023
769bf40
Merge branch 'develop' into DockerizePybamm
arjxn-py Aug 12, 2023
a285352
style: pre-commit fixes
pre-commit-ci[bot] Aug 12, 2023
589912f
Add build image from source instructions
arjxn-py Aug 15, 2023
70e05aa
Add optional arg to doc
arjxn-py Aug 16, 2023
2c0f1cc
Apply suggestions from code review
arjxn-py Aug 19, 2023
8fd0f3f
Move Dockerfile to `scripts/`
arjxn-py Aug 22, 2023
c1d41e0
Apply suggestions from code review
arjxn-py Aug 23, 2023
0e54d8f
Add instructions to use vscode with docker
arjxn-py Aug 23, 2023
64506fe
Merge branch 'DockerizePybamm' of https://github.com/arjxn-py/PyBaMM …
arjxn-py Aug 23, 2023
d885cbe
Make tabs for different solvers
arjxn-py Aug 23, 2023
5ea9b8a
Trigger docs build
arjxn-py Aug 23, 2023
3b0d4fa
Formatting
Saransh-cpp Aug 23, 2023
37e6f38
Format again
Saransh-cpp Aug 23, 2023
0d2a61a
Make `ALL` arg
arjxn-py Aug 24, 2023
abb51e5
Modify docs for `ALL` arg
arjxn-py Aug 24, 2023
ba88308
Apply suggestions from code review
arjxn-py Aug 24, 2023
a058467
Arrange local build of solvers into tabs & Squash
arjxn-py Aug 24, 2023
c0d7abf
Apply suggestions from code review
Saransh-cpp Aug 25, 2023
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
36 changes: 36 additions & 0 deletions Dockerfile
arjxn-py marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM python:3.11-slim

# Set the working directory
WORKDIR /

# Install the necessary dependencies
RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y libopenblas-dev gcc gfortran graphviz git

ENV CMAKE_C_COMPILER=/usr/bin/gcc
ENV CMAKE_MAKE_PROGRAM=/usr/bin/make

# Copy project files into the container
RUN git clone https://github.com/pybamm-team/PyBaMM.git

WORKDIR /PyBaMM/

# Install PyBaMM
RUN python -m pip install --upgrade pip
RUN pip install -e ".[all]"

ARG ODES
ARG JAX
arjxn-py marked this conversation as resolved.
Show resolved Hide resolved


RUN if [ "$ODES" = "true" ]; then \
apt-get install -y cmake && \
pip install wget && \
pybamm_install_odes; \
fi

RUN if [ "$JAX" = "true" ]; then \
pip install -e ".[jax,all]";\
fi

CMD ["/bin/bash"]
arjxn-py marked this conversation as resolved.
Show resolved Hide resolved