From e04669618835b556d60d12a69943b8f8c4668d4d Mon Sep 17 00:00:00 2001 From: cringeyburger Date: Sat, 17 Aug 2024 14:40:26 +0530 Subject: [PATCH] feat: add `scikit-build-core` editable install support for Docker --- .github/workflows/docker.yml | 2 +- scripts/Dockerfile | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index f76b67829c..da27bf5459 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -35,7 +35,7 @@ jobs: context: . file: scripts/Dockerfile tags: pybamm/pybamm:latest - push: true + push: false platforms: linux/amd64, linux/arm64 - name: List built image(s) diff --git a/scripts/Dockerfile b/scripts/Dockerfile index e6fac122ff..49c5d67dc7 100644 --- a/scripts/Dockerfile +++ b/scripts/Dockerfile @@ -13,7 +13,8 @@ USER pybamm WORKDIR /home/pybamm/ -RUN git clone https://github.com/pybamm-team/PyBaMM.git +# TODO: Change clone to upstream before PR merge +RUN git clone --branch migrate-to-sbc https://github.com/cringeyburger/PyBaMM.git WORKDIR /home/pybamm/PyBaMM @@ -28,11 +29,10 @@ RUN uv venv $VIRTUAL_ENV RUN #!/bin/bash && source /home/pybamm/venv/bin/activate; ENV PATH="$VIRTUAL_ENV/bin:$PATH" -RUN uv pip install --upgrade setuptools wheel wget cmake - +RUN uv pip install --upgrade scikit-build-core==0.10.3 wget cmake casadi pybind11 +ENV BUILD_IDAKLU=ON RUN python scripts/install_KLU_Sundials.py && \ -rm -rf pybind11 && \ -git clone https://github.com/pybind/pybind11.git && \ -uv pip install -e ".[all,dev,docs,jax]"; + uv pip install --no-build-isolation --config-settings=editable.rebuild=true -Cbuild-dir=build -ve ".[all,dev,docs,jax]"; + ENTRYPOINT ["/bin/bash"]