Skip to content

Commit

Permalink
Update Dockerfile, need to make all tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
bjodah committed Apr 24, 2024
1 parent 62946d8 commit f4142c7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion chempy/util/tests/test_graph.py
Expand Up @@ -11,7 +11,7 @@
from ..testing import requires, skipif

try:
dot_missing = subprocess.call(["dot", "-?"]) != 0
dot_missing = subprocess.run(["dot", "-?"]).returncode != 0
except OSError:
dot_missing = True

Expand Down
18 changes: 8 additions & 10 deletions scripts/environment/Dockerfile
Expand Up @@ -9,11 +9,11 @@ RUN apt-get update && \
python3-dev python3-pip libboost-dev libgsl-dev liblapack-dev libsuitesparse-dev graphviz && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN mkdir /tmp/sundials-5.5.0-build && \
curl -Ls https://github.com/LLNL/sundials/releases/download/v5.5.0/sundials-5.5.0.tar.gz | tar xz -C /tmp && \
RUN mkdir /tmp/sundials-5.8.0-build && \
curl -Ls https://github.com/LLNL/sundials/releases/download/v5.8.0/sundials-5.8.0.tar.gz | tar xz -C /tmp && \
FC=gfortran-10 cmake \
-S /tmp/sundials-5.5.0 \
-B /tmp/sundials-5.5.0-build \
-S /tmp/sundials-5.8.0 \
-B /tmp/sundials-5.8.0-build \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
Expand All @@ -25,15 +25,13 @@ RUN mkdir /tmp/sundials-5.5.0-build && \
-DENABLE_KLU=ON \
-DKLU_INCLUDE_DIR=/usr/include/suitesparse \
-DKLU_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu && \
cmake --build /tmp/sundials-5.5.0-build && \
cmake --build /tmp/sundials-5.5.0-build --target install && \
rm -r /tmp/sundials-5.5.0*/ && \
cmake --build /tmp/sundials-5.8.0-build && \
cmake --build /tmp/sundials-5.8.0-build --target install && \
rm -r /tmp/sundials-5.8.0*/ && \
python3 -m pip install --upgrade-strategy=eager --upgrade pip && \
python3 -m pip install --upgrade-strategy=eager numpy cython setuptools && \
python3 -m pip install --upgrade-strategy=eager numpy 'cython>=3.0.10' setuptools && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*


# http://computation.llnl.gov/projects/sundials/download/sundials-5.5.0.tar.gz

# At this point the system should be able to pip-install the package and all of its dependencies. We'll do so
# when running the image using the ``host-jupyter-using-docker.sh`` script. Installed packages are cached.
12 changes: 7 additions & 5 deletions scripts/host-jupyter-using-docker.sh
Expand Up @@ -51,14 +51,16 @@ else
LOCALCMD="jupyter notebook --no-browser --port $PORT --ip=* index.ipynb"
PORTFWD="-p ${4:-127.0.0.1}:$PORT:$PORT"
fi
MYCMD="groupadd -f --gid \$HOST_GID \$HOST_WHOAMI; \
useradd --uid \$HOST_UID --gid \$HOST_GID --home /mount \$HOST_WHOAMI; \
sudo --login -u \$HOST_WHOAMI PYCVODES_NO_LAPACK=1 PYCVODES_NO_KLU=1 python3 -m pip install --user -e .[all]; \
sudo --login -u \$HOST_WHOAMI /mount/.local/bin/jupyter-nbextension enable --user --py widgetsnbextension; \
sudo --login -u \$HOST_WHOAMI LD_LIBRARY_PATH=/usr/local/lib MPLBACKEND=Agg /mount/.local/bin/$LOCALCMD"
MYCMD="\
groupadd -f --gid \$HOST_GID \$HOST_WHOAMI; \
useradd --uid \$HOST_UID --gid \$HOST_GID --home /mount/.env \$HOST_WHOAMI; \
sudo -u \$HOST_WHOAMI PYCVODES_NO_LAPACK=1 PYCVODES_NO_KLU=1 python3 -m pip install --cache-dir /mount/.env/pypi-cache --user -e .[all]; \
sudo -u \$HOST_WHOAMI /mount/.env/.local/bin/jupyter-nbextension enable --user --py widgetsnbextension; \
sudo -u \$HOST_WHOAMI LD_LIBRARY_PATH=/usr/local/lib MPLBACKEND=Agg PYTHONPATH=/mount /mount/.env/.local/bin/$LOCALCMD"

set -x

mkdir -m 777 -p .env

$PODMAN run \
--rm \
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -128,7 +128,7 @@ def _path_under_setup(*args):
"sympy>=1.1.1,!=1.2",
"quantities>=0.12.1",
"pyneqsys>=0.5.5",
"pyodesys>=0.14.1" if sys.version_info[0] >= 3 else "pyodesys<0.12",
"pyodesys>=0.14.3" if sys.version_info[0] >= 3 else "pyodesys<0.12",
"pyparsing>=2.0.3",
"sym>=0.3.4",
"pulp>=1.6.8",
Expand Down

0 comments on commit f4142c7

Please sign in to comment.