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

Fix Github Runner Docker build failing #285

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,32 @@ RUN yum groupinstall "Development Tools" -y --nogpgcheck && \
yum install -y --nogpgcheck mesa-libGL libXt libXt-devel wget gcc-gfortran lapack vim tmux && \
yum clean all

# Install Mamba
# Swapped from Conda to Mamba due to Github runner memory constraint
# Install Mamba - swapped from Conda to Mamba due to Github runner memory constraint
RUN wget --no-check-certificate https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh -O /mamba.sh && \
chmod +x /mamba.sh && \
/mamba.sh -b -p /mamba/ && \
rm /mamba.sh && hash -r

ADD / /sharpy_dir/

# Update mamba and make it run with no user interaction
# Cleanup mamba installation
RUN mamba init bash
RUN mamba config --set always_yes yes --set changeps1 no
RUN mamba update -q conda
RUN mamba config --set auto_activate_base false
RUN mamba env create -f /sharpy_dir/utils/environment.yml
#RUN mamba clean -afy
RUN find /mamba/ -follow -type f -name '*.a' -delete
RUN find /mamba/ -follow -type f -name '*.pyc' -delete
RUN find /mamba/ -follow -type f -name '*.js.map' -delete

#COPY /utils/docker/* /root/
# Initialise mamba installation
RUN mamba init bash && \
mamba update -q conda && \
mamba env create -f /sharpy_dir/utils/environment.yml && \
find /mamba/ -follow -type f -name '*.a' -delete && \
find /mamba/ -follow -type f -name '*.pyc' -delete && \
find /mamba/ -follow -type f -name '*.js.map' -delete

RUN ln -s /sharpy_dir/utils/docker/* /root/

RUN cd sharpy_dir && \
mamba activate sharpy && \
git submodule update --init --recursive && \
mkdir build && \
cd build && \
CXX=g++ FC=gfortran cmake .. && make install -j 2 && \
CXX=g++ FC=gfortran cmake .. && make install -j 4 && \
cd .. && \
pip install . && \
rm -rf build

ENTRYPOINT ["/bin/bash", "--init-file", "/root/bashrc"]
ENTRYPOINT ["/bin/bash", "--init-file", "/root/bashrc"]
Loading