Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing conda binary build via optional RMS install (dependent on #2631) #2641

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions .conda/build.sh
@@ -1,6 +1 @@
# Install RMG
make install

# lazy "install" of everything in our 'external' folder.
# most of which should probably be elsewhere
cp -R ${SRC_DIR}/external ${SP_DIR}
4 changes: 0 additions & 4 deletions .conda/conda_build_config.yaml
Expand Up @@ -2,7 +2,3 @@ python:
- 3.7
numpy:
- 1.15

# Specifically for Travis build. Should change if building locally.
CONDA_BUILD_SYSROOT:
- /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk # [osx]
204 changes: 144 additions & 60 deletions .conda/meta.yaml
Expand Up @@ -11,76 +11,160 @@ build:

requirements:
build:
- {{ compiler('c') }} # [unix]
- {{ compiler('c') }}
host:
- cython >=0.25.2
- lpsolve55
- numpy
- openbabel >=3
- pydas >=1.0.2
- pydqed >=1.0.1
- pyrdl
- python
- quantities
- rdkit >=2018
- scipy
- setuptools
- conda-forge::libxcrypt # remove after upgrading Python versions
- conda-forge::cairo
- conda-forge::cairocffi
- conda-forge::ffmpeg
- conda-forge::xlrd
- conda-forge::xlwt
- conda-forge::h5py
- conda-forge::graphviz
- conda-forge::markupsafe
- conda-forge::psutil
- conda-forge::ncurses
- conda-forge::suitesparse
- conda-forge::coolprop
- cantera::cantera =2.6
- conda-forge::mopac
- conda-forge::cclib >=1.6.3,!=1.8.0
- conda-forge::openbabel >=3
- conda-forge::rdkit >=2022.09.1
- conda-forge::python >=3.7
- conda-forge::coverage
- conda-forge::cython >=0.25.2
- conda-forge::scikit-learn
- conda-forge::scipy <1.11
- conda-forge::numpy >=1.10.0
- conda-forge::pydot
- conda-forge::jinja2
- conda-forge::jupyter
- conda-forge::pymongo
- conda-forge::pyparsing
- conda-forge::pyyaml
- conda-forge::networkx
- conda-forge::pytest
- conda-forge::pytest-cov
- conda-forge::matplotlib >=1.5
- conda-forge::mpmath
- conda-forge::pandas
- conda-forge::gprof2dot
- conda-forge::numdifftools
- conda-forge::quantities
- rmg::lpsolve55
- rmg::muq2
- rmg::pydas >=1.0.3
- rmg::pydqed >=1.0.3
- rmg::pyrdl
- rmg::symmetry
- conda-forge::nomkl
run:
- cairo
- cairocffi
- cantera >=2.3.0
- cclib >=1.6.3
- coolprop
- coverage
- cython >=0.25.2
- ffmpeg
- gprof2dot
- graphviz
- h5py
- jinja2
- jupyter
- lpsolve55
- markupsafe
- matplotlib >=1.5
- mopac
- mpmath
- muq2
- networkx
- nose
- numdifftools
- {{ pin_compatible('numpy') }}
- openbabel >=3
- pandas
- psutil
- pydas >=1.0.2
- pydot
- pydqed >=1.0.1
- pymongo
- pyparsing
- pyrdl
- python
- pyyaml
- pyzmq
- quantities
- rdkit >=2018
- rmgdatabase >=3.2.0
- scikit-learn
- scipy
- symmetry
- xlrd
- xlwt
- conda-forge::libxcrypt # remove after upgrading Python versions
- jacksonburns::rmgdatabase
- conda-forge::cairo
- conda-forge::cairocffi
- conda-forge::ffmpeg
- conda-forge::xlrd
- conda-forge::xlwt
- conda-forge::h5py
- conda-forge::graphviz
- conda-forge::markupsafe
- conda-forge::psutil
- conda-forge::ncurses
- conda-forge::suitesparse
- conda-forge::coolprop
- cantera::cantera =2.6
- conda-forge::mopac
- conda-forge::cclib >=1.6.3,!=1.8.0
- conda-forge::openbabel >=3
- conda-forge::rdkit >=2022.09.1
- conda-forge::python >=3.7
- conda-forge::coverage
- conda-forge::cython >=0.25.2
- conda-forge::scikit-learn
- conda-forge::scipy <1.11
- conda-forge::numpy >=1.10.0
- conda-forge::pydot
- conda-forge::jinja2
- conda-forge::jupyter
- conda-forge::pymongo
- conda-forge::pyparsing
- conda-forge::pyyaml
- conda-forge::networkx
- conda-forge::pytest
- conda-forge::pytest-cov
- conda-forge::matplotlib >=1.5
- conda-forge::mpmath
- conda-forge::pandas
- conda-forge::gprof2dot
- conda-forge::numdifftools
- conda-forge::quantities
- rmg::lpsolve55
- rmg::muq2
- rmg::pydas >=1.0.3
- rmg::pydqed >=1.0.3
- rmg::pyrdl
- rmg::symmetry
- conda-forge::nomkl
test:
requires:
- conda-forge::libxcrypt # remove after upgrading Python versions
- jacksonburns::rmgdatabase
- conda-forge::cairo
- conda-forge::cairocffi
- conda-forge::ffmpeg
- conda-forge::xlrd
- conda-forge::xlwt
- conda-forge::h5py
- conda-forge::graphviz
- conda-forge::markupsafe
- conda-forge::psutil
- conda-forge::ncurses
- conda-forge::suitesparse
- conda-forge::coolprop
- cantera::cantera =2.6
- conda-forge::mopac
- conda-forge::cclib >=1.6.3,!=1.8.0
- conda-forge::openbabel >=3
- conda-forge::rdkit >=2022.09.1
- conda-forge::python >=3.7
- conda-forge::coverage
- conda-forge::cython >=0.25.2
- conda-forge::scikit-learn
- conda-forge::scipy <1.11
- conda-forge::numpy >=1.10.0
- conda-forge::pydot
- conda-forge::jinja2
- conda-forge::jupyter
- conda-forge::pymongo
- conda-forge::pyparsing
- conda-forge::pyyaml
- conda-forge::networkx
- conda-forge::pytest
- conda-forge::pytest-cov
- conda-forge::matplotlib >=1.5
- conda-forge::mpmath
- conda-forge::pandas
- conda-forge::gprof2dot
- conda-forge::numdifftools
- conda-forge::quantities
- rmg::lpsolve55
- rmg::muq2
- rmg::pydas >=1.0.3
- rmg::pydqed >=1.0.3
- rmg::pyrdl
- rmg::symmetry
- conda-forge::nomkl
source_files:
- 'examples/rmg/superminimal'
- 'examples/arkane/networks/n-butanol'
imports:
- rmgpy
- arkane
commands:
- rmg.py examples/rmg/superminimal/input.py # [unix]
- Arkane.py examples/arkane/networks/n-butanol/input.py # [unix]
- python %SCRIPTS%\rmg.py examples\rmg\superminimal\input.py # [win]
- python %SCRIPTS\Arkane.py examples\arkane\networks\n-butanol\input.py # [win]
- rmg.py examples/rmg/superminimal/input.py
- Arkane.py examples/arkane/networks/n-butanol/input.py

about:
home: https://github.com/ReactionMechanismGenerator/RMG-Py
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/CI.yml
Expand Up @@ -122,6 +122,12 @@ jobs:
activate-environment: rmg_env
use-mamba: true

# installs the extra RMS conda dependencies
- name: Add RMS dependencies
run: |
mamba install -c conda-forge julia=1.9.1 pyjulia>=0.6
mamba install -c rmg pyrms diffeqpy

# list the environment for debugging purposes
- name: mamba info
run: |
Expand Down
73 changes: 33 additions & 40 deletions .github/workflows/conda_build.yml
@@ -1,58 +1,51 @@
name: Conda Build

on:
pull_request:
push:
branches:
- stable
jobs:
build-linux:
runs-on: ubuntu-latest
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: environment.yml
python-version: 3.7
activate-environment: rmg_env
- name: Conda info
auto-update-conda: false
conda-solver: libmamba
auto-activate-base: true
activate-environment: ""
- name: Install Build Tools
run: conda install python anaconda-client conda-build
- name: Configure Auto-Upload
if: github.ref == 'refs/heads/stable'
run: |
conda info
conda list
conda config --set anaconda_upload yes
- name: Build Binary
env:
CONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
CONDA_TOKEN: "need_to_add_this_secret" # ${{ secrets.ANACONDA_TOKEN }}
run: |
conda install -y conda-build
conda install -y anaconda-client
conda config --add channels rmg
conda config --set anaconda_upload yes
conda build --token $CONDA_TOKEN --user rmg .conda
build-osx:
runs-on: macos-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
python-version: 3.7
activate-environment: rmg_env
- name: Conda info
run: |
conda info
conda list
- name: Build Binary
env:
CONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
conda config --add channels cantera
conda config --add channels conda-forge
conda config --add channels jacksonburns
conda-build --token $CONDA_TOKEN --user rmg .conda
- name: Test Binary Install with RMS
run: |
conda install -y conda-build
conda install -y anaconda-client
conda config --add channels rmg
conda config --set anaconda_upload yes
xcrun --show-sdk-path
conda build --token $CONDA_TOKEN --user rmg .conda
conda create --name rmg_test python=3.7*
conda activate rmg_test
conda install -c local rmg
conda install -c conda-forge julia=1.9.1 pyjulia>=0.6
conda install -c rmg pyrms diffeqpy
python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()"
julia -e 'using Pkg; Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="main")); using ReactionMechanismSimulator'
python-jl rmg.py test/regression/RMS_constantVIdealGasReactor_superminimal/input.py
6 changes: 6 additions & 0 deletions .github/workflows/docs.yml
Expand Up @@ -36,6 +36,12 @@ jobs:
activate-environment: rmg_env
use-mamba: true

# installs the extra RMS conda dependencies
- name: Add RMS dependencies
run: |
mamba install -c conda-forge julia=1.9.1 pyjulia>=0.6
mamba install -c rmg pyrms diffeqpy

- name: Install sphinx
run: mamba install -y sphinx

Expand Down
11 changes: 5 additions & 6 deletions Dockerfile
Expand Up @@ -28,10 +28,6 @@ RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh &
rm Miniconda3-latest-Linux-x86_64.sh
ENV PATH="$PATH:/miniconda/bin"

# Set solver backend to mamba for speed
RUN conda install -n base conda-libmamba-solver && \
conda config --set solver libmamba

# Set Bash as the default shell for following commands
SHELL ["/bin/bash", "-c"]

Expand All @@ -44,8 +40,7 @@ RUN git clone --single-branch --branch main --depth 1 https://github.com/Reactio

WORKDIR /rmg/RMG-Py
# build the conda environment
RUN conda env create --file environment.yml && \
conda clean --all --yes
RUN conda env create --file environment.yml

# This runs all subsequent commands inside the rmg_env conda environment
#
Expand All @@ -54,6 +49,10 @@ RUN conda env create --file environment.yml && \
# in a Dockerfile build script)
SHELL ["conda", "run", "--no-capture-output", "-n", "rmg_env", "/bin/bash", "-c"]

RUN conda install -c conda-forge julia=1.9.1 pyjulia>=0.6 && \
conda install -c rmg pyrms diffeqpy && \
conda clean --all --yes

# Set environment variables as directed in the RMG installation instructions
ENV RUNNER_CWD=/rmg
ENV PYTHONPATH="$RUNNER_CWD/RMG-Py:$PYTHONPATH"
Expand Down