Skip to content

Commit

Permalink
Fix dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecThomson committed Jul 31, 2024
1 parent ee8f013 commit 0f53d57
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RUN echo "Updating apt repositories"
RUN apt update && apt upgrade -y && apt install -y git
USER $MAMBA_USER
ARG MAMBA_DOCKERFILE_ACTIVATE=1
WORKDIR /src
WORKDIR /home/mambauser
RUN mkdir /tmp/numba_cache & chmod 777 /tmp/numba_cache & NUMBA_CACHE_DIR=/tmp/numba_cache
ENV NUMBA_CACHE_DIR=/tmp/numba_cache
COPY --chown=$MAMBA_USER:$MAMBA_USER . ./src
Expand Down
28 changes: 13 additions & 15 deletions Dockerfile.mpich
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
FROM continuumio/miniconda3

FROM mambaorg/micromamba
USER root
RUN echo "Updating apt repositories"
RUN apt update && apt upgrade -y
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata
RUN apt install -y build-essential gfortran mpich
RUN apt autoremove -y
RUN apt clean -y
RUN apt update && apt upgrade -y && apt install -y git mpich
USER $MAMBA_USER
ARG MAMBA_DOCKERFILE_ACTIVATE=1
WORKDIR /home/mambauser
RUN mkdir /tmp/numba_cache & chmod 777 /tmp/numba_cache & NUMBA_CACHE_DIR=/tmp/numba_cache
WORKDIR ./
ENV NUMBA_CACHE_DIR=/tmp/numba_cache
ADD . /tmp/
RUN conda env create -f /tmp/environment.yml

# Pull the environment name out of the environment.yml
RUN echo "source activate racs-tools" > ~/.bashrc
ENV PATH /opt/conda/envs/racs-tools/bin:$PATH
RUN pip install mpi4py-mpich
COPY --chown=$MAMBA_USER:$MAMBA_USER . ./src
RUN echo "Installing python and uv"
RUN micromamba install python=3.10 uv -y -c conda-forge && \
micromamba clean --all --yes
RUN echo "Installing RACS-tools"
RUN micromamba run uv pip install ./src[mpi]
ENTRYPOINT ["/usr/local/bin/_entrypoint.sh"]

0 comments on commit 0f53d57

Please sign in to comment.