-
-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,36 @@ | ||
FROM python:3.10-slim | ||
FROM ubuntu:22.04 | ||
|
||
# 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 make g++ build-essential python3.11-dev python3-pip | ||
RUN apt-get install -y libopenblas-dev gcc gfortran graphviz git make g++ build-essential python3.9 python3-pip | ||
|
||
ENV CMAKE_C_COMPILER=/usr/bin/gcc | ||
ENV CMAKE_CXX_COMPILER=/usr/bin/g++ | ||
ENV CMAKE_MAKE_PROGRAM=/usr/bin/make | ||
ENV SUNDIALS_INST=root/.local | ||
ENV LD_LIBRARY_PATH=root/.local/lib: | ||
|
||
RUN python3.9 -m pip install wget | ||
|
||
# Copy project files into the container | ||
RUN git clone https://github.com/pybamm-team/PyBaMM.git | ||
|
||
WORKDIR /PyBaMM/ | ||
|
||
# RUN python3.11 -m pip install virtualenv | ||
RUN apt-get install -y python3.11-venv | ||
RUN python3.11 -m venv venv | ||
RUN /bin/bash -c "source venv/bin/activate" | ||
|
||
# Install PyBaMMs | ||
RUN python3.11 -m pip install --upgrade pip setuptools wheel nox | ||
# RUN pip install -e ".[all]" | ||
|
||
ARG ODES | ||
ARG JAX | ||
ARG IDAKLU | ||
# Install virtualenv | ||
RUN python3.9 -m pip install virtualenv | ||
|
||
# Create and activate virtual environment | ||
RUN virtualenv -p python3.9 venv | ||
RUN /bin/bash -c "source venv/bin/activate" | ||
|
||
# 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 | ||
|
||
RUN pip install wget cmake | ||
RUN python scripts/install_KLU_Sundials.py | ||
# Install PyBaMM | ||
RUN python3.9 -m pip install --upgrade pip setuptools wheel nox | ||
RUN python3.9 scripts/install_KLU_Sundials.py | ||
RUN git clone https://github.com/pybind/pybind11.git pybind11/ | ||
RUN python3.11 -m pip install -e ".[all]" | ||
RUN python3.9 -m pip install -e ".[all]" | ||
|
||
CMD ["/bin/bash"] |