Skip to content

Commit 43d5bf8

Browse files
authored
Merge pull request #2724 from ReactionMechanismGenerator/docker_miniforge
Changed Dockerfile to use Miniforge3
2 parents 704632d + 3660d8f commit 43d5bf8

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ jobs:
401401
password: ${{ secrets.DOCKERHUB_TOKEN }}
402402

403403
- name: Build and Push
404-
uses: docker/build-push-action@v4
404+
uses: docker/build-push-action@v6
405405
with:
406406
push: true
407407
tags: reactionmechanismgenerator/rmg:latest

Dockerfile

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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
3232
RUN 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
3636
SHELL ["/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
3945
WORKDIR /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

4551
WORKDIR /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
6571
ENV JULIA_CPU_TARGET="x86-64,haswell,skylake,broadwell,znver1,znver2,znver3,cascadelake,icelake-client,cooperlake,generic"
6672
RUN 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

Comments
 (0)