Skip to content

Commit

Permalink
Fixed RMG-Py installation using Micromamba Docker Image
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinp0 committed Nov 1, 2023
1 parent 76f7472 commit c5ea208
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions devtools/Dockerfile_rmgpy
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ RUN usermod "--login=${NEW_MAMBA_USER}" "--home=/home/${NEW_MAMBA_USER}" \
--move-home "-u ${NEW_MAMBA_USER_ID}" "${MAMBA_USER}" && \
groupmod "--new-name=${NEW_MAMBA_USER}" \
"-g ${NEW_MAMBA_USER_GID}" "${MAMBA_USER}" && \
# Update the expected value of MAMBA_USER for the
# _entrypoint.sh consistency check.
echo "${NEW_MAMBA_USER}" > "/etc/arg_mamba_user" && \
:

Expand All @@ -41,11 +39,12 @@ RUN apt-get update && apt-get install -y \
make \
libgomp1\
libxrender1 \
sudo \
&& apt-get clean \
&& apt-get autoclean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

&& rm -rf /var/lib/apt/lists/*\
&& echo "${NEW_MAMBA_USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# Change user to the non-root user
USER $MAMBA_USER

Expand All @@ -64,6 +63,7 @@ WORKDIR /home/rmguser/Code/RMG-Py

# Install RMG-Py and then clean up the micromamba cache
RUN micromamba create -y -f environment.yml && \
micromamba install -n rmg_env -c conda-forge conda && \
micromamba clean --all -f -y

# Activate the RMG environment
Expand All @@ -88,7 +88,7 @@ RUN make \
# The extra arguments are required to install PyCall and RMS in this Dockerfile. Will not work without them.
# Final command is to compile the RMS during Docker build - This will reduce the time it takes to run RMS for the first time
RUN touch /opt/conda/envs/rmg_env/condarc-julia.yml
RUN CONDA_JL_CONDA_EXE=/bin/micromamba julia -e 'using Pkg;Pkg.add(PackageSpec(name="PyCall", rev="master")); Pkg.build("PyCall"); Pkg.add(PackageSpec(name="ReactionMechanismSimulator", rev="main"))' \
RUN CONDA_JL_CONDA_EXE=/bin/micromamba julia -e 'ENV["CONDA_JL_CONDA_EXE"]="/opt/conda/envs/rmg_env/bin/conda";using Pkg;Pkg.add(PackageSpec(name="PyCall", rev="master")); Pkg.build("PyCall"); Pkg.add(PackageSpec(name="ReactionMechanismSimulator", rev="main"))' \
&& python -c "import julia; julia.install(); import diffeqpy; diffeqpy.install()" \
&& python-jl -c "from pyrms import rms"

Expand Down

0 comments on commit c5ea208

Please sign in to comment.