Skip to content

Commit

Permalink
update internal base version and poetry deps and container builds
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Oct 29, 2024
1 parent 8ee086c commit 6add0f3
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 145 deletions.
2 changes: 1 addition & 1 deletion Dockerfile-base
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ RUN python3.10 -m pip install --upgrade pip \
&& python3.10 -m pip install poetry \
&& poetry config virtualenvs.in-project true \
&& poetry env use 3.10 \
&& poetry install --without=api,worker
&& poetry install --without=api,worker,pysces,masspy


# install smoldyn
Expand Down
2 changes: 1 addition & 1 deletion assets/.BASE_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.4
0.1.5
78 changes: 35 additions & 43 deletions compose_worker/Dockerfile-compose_worker
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,27 @@ RUN apt-get update && apt-get install -y libatlas-base-dev \

# SUNDIALS --> installation path is default cmake (/usr/local) with LD_LIBRARY_PATH as runtime location
# ignore certificate checking because certificate was expired as of 2021-11-10
ARG SUNDIALS_VERSION=2.6.2
RUN apt-get install -y --no-install-recommends \
wget \
cmake \
make \
g++ \
\
&& cd /tmp \
&& wget --no-check-certificate https://computing.llnl.gov/sites/default/files/inline-files/sundials-${SUNDIALS_VERSION}.tar.gz \
&& tar xvvf sundials-${SUNDIALS_VERSION}.tar.gz \
&& cd sundials-${SUNDIALS_VERSION} \
&& mkdir build \
&& cd build \
&& CFLAGS="-fPIC" cmake .. \
&& make \
&& make install \
\
&& cd /tmp \
&& rm sundials-${SUNDIALS_VERSION}.tar.gz \
&& rm -r sundials-${SUNDIALS_VERSION}
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
# ARG SUNDIALS_VERSION=2.6.2
# RUN apt-get install -y --no-install-recommends \
# wget \
# cmake \
# make \
# g++ \
# \
# && cd /tmp \
# && wget --no-check-certificate https://computing.llnl.gov/sites/default/files/inline-files/sundials-${SUNDIALS_VERSION}.tar.gz \
# && tar xvvf sundials-${SUNDIALS_VERSION}.tar.gz \
# && cd sundials-${SUNDIALS_VERSION} \
# && mkdir build \
# && cd build \
# && CFLAGS="-fPIC" cmake .. \
# && make \
# && make install \
# \
# && cd /tmp \
# && rm sundials-${SUNDIALS_VERSION}.tar.gz \
# && rm -r sundials-${SUNDIALS_VERSION}
# ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

############################################
# App content
Expand All @@ -56,37 +56,29 @@ ENV PATH="/root/.local/bin:$PATH"
RUN poetry install --only=worker --no-cache

# Install Assimulo from source for Pysces
RUN apt-get update \
&& apt-get install -y libblas-dev \
liblapack-dev \
libatlas-base-dev \
python3-distutils \
python3-dev \
&& git clone https://github.com/modelon-community/Assimulo.git \
&& cd Assimulo \
&& poetry run pip install --upgrade setuptools pip wheel Cython numpy \
&& poetry run python3 setup.py install --sundials-home=/usr/local --blas-home=/usr/lib/x86_64-linux-gnu

# && cd Assimulo \
# && rm -rf build \
# && poetry run python3 setup.py install --sundials-home=/usr/local --blas-home=/usr/lib/x86_64-linux-gnu

# revert numpy back to original spec
RUN poetry remove numpy
# RUN poetry run pip install numpy==$(poetry run python3 -c "import toml; print(toml.load('/app/pyproject.toml')['tool']['poetry']['group']['worker']['dependencies']['numpy'].strip('<'))") \
# && poetry lock
# RUN apt-get update \
# && apt-get install -y libblas-dev \
# liblapack-dev \
# libatlas-base-dev \
# python3-distutils \
# python3-dev \
# && git clone https://github.com/modelon-community/Assimulo.git \
# && cd Assimulo \
# && poetry run pip install --upgrade setuptools pip wheel Cython numpy \
# && poetry run python3 setup.py install --sundials-home=/usr/local --blas-home=/usr/lib/x86_64-linux-gnu

# install masspy TODO: implement this
RUN git clone https://github.com/biosimulators/Biosimulators_MASSpy.git \
&& cd Biosimulators_MASSpy \
&& rm pyproject.toml
# RUN git clone https://github.com/biosimulators/Biosimulators_MASSpy.git \
# && cd Biosimulators_MASSpy \
# && rm pyproject.toml

WORKDIR /app/worker

RUN python3 -c "import os;files=os.listdir();import shutil;[shutil.rmtree(f) if '__pycache__' in f else None for f in files]"

ENTRYPOINT ["poetry", "run", "python3", "main.py"]


#############################
# Fenics

Expand Down
Loading

0 comments on commit 6add0f3

Please sign in to comment.