@@ -23,10 +23,10 @@ RUN apt-get update && \
2323 apt-get clean -y
2424
2525# Install conda
26- RUN wget https://repo.anaconda. com/miniconda/Miniconda3- latest-Linux-x86_64.sh && \
27- bash Miniconda3-latest- Linux-x86_64.sh -b -p /miniconda && \
28- rm Miniconda3-latest -Linux-x86_64.sh
29- ENV PATH="$PATH:/miniconda /bin"
26+ RUN wget " https://github. com/conda-forge/miniforge/releases/ latest/download/Miniforge3 -Linux-x86_64.sh" && \
27+ bash Miniforge3- Linux-x86_64.sh -b -p /miniforge && \
28+ rm Miniforge3 -Linux-x86_64.sh
29+ ENV PATH="$PATH:/miniforge /bin"
3030
3131# Set solver backend to mamba for speed
3232RUN conda install -n base conda-libmamba-solver && \
@@ -35,12 +35,18 @@ RUN conda install -n base conda-libmamba-solver && \
3535# Set Bash as the default shell for following commands
3636SHELL ["/bin/bash" , "-c" ]
3737
38+ # Add build arguments for RMG-Py, RMG-database, and RMS branches.
39+ ARG RMG_Py_Branch=main
40+ ARG RMG_Database_Branch=main
41+ ARG RMS_Branch=main
42+ ENV rmsbranch=${RMS_Branch}
43+
3844# cd
3945WORKDIR /rmg
4046
4147# Clone the RMG base and database repositories
42- RUN git clone --single-branch --branch main --depth 1 https://github.com/ReactionMechanismGenerator/RMG-Py.git && \
43- git clone --single-branch --branch main --depth 1 https://github.com/ReactionMechanismGenerator/RMG-database.git
48+ RUN git clone --single-branch --branch ${RMG_Py_Branch} --depth 1 https://github.com/ReactionMechanismGenerator/RMG-Py.git && \
49+ git clone --single-branch --branch ${RMG_Database_Branch} --depth 1 https://github.com/ReactionMechanismGenerator/RMG-database.git
4450
4551WORKDIR /rmg/RMG-Py
4652# build the conda environment
@@ -64,7 +70,7 @@ ENV PATH="$RUNNER_CWD/RMG-Py:$PATH"
6470# setting this env variable fixes an issue with Julia precompilation on Windows
6571ENV JULIA_CPU_TARGET="x86-64,haswell,skylake,broadwell,znver1,znver2,znver3,cascadelake,icelake-client,cooperlake,generic"
6672RUN make && \
67- julia -e 'using Pkg; Pkg.add(PackageSpec(name="PyCall",rev="master")); Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev="main" )); using ReactionMechanismSimulator' && \
73+ julia -e 'using Pkg; Pkg.add(PackageSpec(name="PyCall",rev="master")); Pkg.add(PackageSpec(name="ReactionMechanismSimulator",rev=ENV["rmsbranch"] )); using ReactionMechanismSimulator' && \
6874 python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()"
6975
7076# RMG-Py should now be installed and ready - trigger precompilation and test run
0 commit comments