From 3abb06c761b59552d5289f22c52c686e52e0509d Mon Sep 17 00:00:00 2001 From: MBueschelberger Date: Thu, 24 Aug 2023 06:05:19 -0500 Subject: [PATCH] fix installation procedure --- .env.template | 3 +++ Dockerfile | 22 +++++++++++++--------- README.md | 4 ++-- docker-compose.dev.yml | 4 ++-- setup.cfg | 2 +- 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.env.template b/.env.template index 9539ff7..8d0231f 100755 --- a/.env.template +++ b/.env.template @@ -2,6 +2,9 @@ GITHUB_ACCESS_TOKEN= BUILD_VERSION=v1.0.0 +WRAPPER_DEPS_INSTALL=https://github.com/SCM-NV/pyZacros/archive/refs/tags/v.1.2.zip https://github.com/mbracconi/adaptiveDesignProcedure/archive/refs/tags/v1.4.0.zip +WRAPPER_DEPS_EXTRA=git+https://github.com/SCM-NV/PLAMS@7661960a9db53249a0b77935dacc8a7668c2489b + CATALYTIC_FOAM_REPO=https://oauth2:${GITHUB_ACCESS_TOKEN}@github.com/MBueschelberger/catalyticFoam_ReaxPro.git EIGEN_REPO=https://gitlab.com/libeigen/eigen/-/archive/3.3.9/eigen-3.3.9.tar.gz diff --git a/Dockerfile b/Dockerfile index 4f5ed09..73083f1 100755 --- a/Dockerfile +++ b/Dockerfile @@ -19,11 +19,9 @@ RUN apt-get update && apt-get install -y \ # retrieve build args ARG GITHUB_ACCESS_TOKEN -ARG GITLAB_ACCESS_TOKEN ARG EIGEN_REPO ARG CATALYTIC_FOAM_REPO - # make code base in homedir read-/write-/executable to USER RUN chmod -R 0777 /home/openfoam # update .profile and add .local/bin to PATH @@ -46,7 +44,7 @@ COPY .compile mybashrc RUN source /opt/openfoam8/etc/bashrc && source mybashrc && ./Allwmake # add code base -WORKDIR /home/openfoam/reaxpro_wrappers +WORKDIR /home/openfoam/simphony-catalytic COPY osp osp COPY tests tests COPY examples examples @@ -64,12 +62,15 @@ RUN \ ################################## target: dev ################################## from base as develop -WORKDIR /home/openfoam/reaxpro_wrappers +ARG WRAPPER_DEPS_INSTALL +ARG WRAPPER_DEPS_EXTRA + +WORKDIR /home/openfoam/simphony-catalytic # # install deps for pytests RUN pip install --upgrade pip -RUN pip install osp-core -RUN pip install .[dev,pre_commit,tests] +RUN pip install osp-core $WRAPPER_DEPS_INSTALL +RUN pip install .[dev,pre_commit,tests] $WRAPPER_DEPS_EXTRA # go /app dir WORKDIR /app @@ -82,10 +83,13 @@ RUN chown openfoam:openfoam /tmp from base as production -WORKDIR /home/openfoam/reaxpro_wrappers +ARG WRAPPER_DEPS_INSTALL +ARG WRAPPER_DEPS_EXTRA + +WORKDIR /home/openfoam/simphony-catalytic USER openfoam # # install wrappers and their python-dependencies RUN pip install --upgrade pip -RUN pip install osp-core -RUN pip install . +RUN pip install osp-core $WRAPPER_DEPS_INSTALL +RUN pip install . $WRAPPER_DEPS_EXTRA diff --git a/README.md b/README.md index 6c2c3ed..2c8724a 100755 --- a/README.md +++ b/README.md @@ -30,10 +30,10 @@ More important, make sure that you have the catalyticFOAM-solver installed on yo ### Python dependencies -First of all, you will need to install OSP-core +First of all, you will need to install OSP-core, plams, AdaptiveDesignProcedure and pyZacros (all except osp-core are not on PyPI yet unfortunately): ```shell -(env) user@computer:~/reaxpro-wrappers$ pip install osp-core +(env) user@computer:~/reaxpro-wrappers$ pip install osp-core https://github.com/SCM-NV/pyZacros/archive/refs/tags/v.1.2.zip https://github.com/mbracconi/adaptiveDesignProcedure/archive/refs/tags/v1.4.0.zip git+https://github.com/SCM-NV/PLAMS@7661960a9db53249a0b77935dacc8a7668c2489b ``` Then, install the wrapper. Simply type: diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 37b2837..99c3de1 100755 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -7,14 +7,14 @@ services: context: "." args: - GITHUB_ACCESS_TOKEN=$GITHUB_ACCESS_TOKEN - - GITLAB_ACCESS_TOKEN=$GITLAB_ACCESS_TOKEN - CATALYTIC_FOAM_REPO=$CATALYTIC_FOAM_REPO - EIGEN_REPO=$EIGEN_REPO + - WRAPPER_DEPS_EXTRA=$WRAPPER_DEPS_EXTRA + - WRAPPER_DEPS_INSTALL=$WRAPPER_DEPS_INSTALL target: "${DOCKER_BUILD_TARGET:-develop}" tty: True entrypoint: /bin/bash environment: - GITLAB_ACCESS_TOKEN: ${GITLAB_ACCESS_TOKEN} REAXPRO_MINIO_ENDPOINT: minio:9000 REAXPRO_MINIO_USER: ${REAXPRO_MINIO_USER} REAXPRO_MINIO_PASSWORD: ${REAXPRO_MINIO_PASSWORD} diff --git a/setup.cfg b/setup.cfg index b78ee2b..a0ad687 100755 --- a/setup.cfg +++ b/setup.cfg @@ -27,7 +27,7 @@ install_requires = parsimonious arcp>=0.2.1 minio>=7.1.15 - reaxpro-wrappers>=1.6.1 + reaxpro-wrappers>=1.6.2 python_requires = >3.7, <3.11 include_package_data = True package_dir =