Skip to content

Commit af210fb

Browse files
authored
Feature dockerfile for dr6 (#197)
* Create Dockerfile * Update docker-image.yml * Update docker-image.yml * Update Dockerfile
1 parent e07ce9f commit af210fb

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

.github/workflows/docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Build and push Docker image
3434
uses: docker/build-push-action@v5
3535
with:
36-
context: .
36+
context: project/ACT_DR6
3737
push: true
3838
tags: ${{ steps.meta.outputs.tags }}
3939
labels: ${{ steps.meta.outputs.labels }}

project/ACT_DR6/Dockerfile

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
FROM ubuntu:22.04
2+
3+
WORKDIR /opt
4+
5+
RUN <<EOF
6+
apt-get update
7+
apt-get install --yes \
8+
build-essential \
9+
gfortran \
10+
git \
11+
libgsl-dev \
12+
python3-dev \
13+
python3-pip \
14+
python3-venv \
15+
python-is-python3 \
16+
wget
17+
apt-get clean all
18+
EOF
19+
20+
# Install manually and not using apt packages see
21+
# https://docs.nersc.gov/development/containers/shifter/how-to-use/#using-mpi-in-shifter
22+
ARG mpich=4.0.2
23+
ARG mpich_prefix=mpich-$mpich
24+
RUN <<EOF
25+
wget https://www.mpich.org/static/downloads/$mpich/$mpich_prefix.tar.gz
26+
tar xvzf $mpich_prefix.tar.gz
27+
cd $mpich_prefix
28+
./configure FFLAGS=-fallow-argument-mismatch FCFLAGS=-fallow-argument-mismatch
29+
make -j 16 && make install && make clean
30+
cd ..
31+
rm -rf $mpich_prefix $mpich_prefix.tar.gz
32+
EOF
33+
34+
RUN /sbin/ldconfig
35+
36+
RUN <<EOF
37+
wget https://portal.nersc.gov/cfs/sobs/users/xgarrido/setup.sh
38+
sed -i \
39+
-e 's#git@github.com:#https://github.com/#g' \
40+
-e '/module load\|module swap\|MPICC/d' \
41+
-e '/ACTCollaboration/d' \
42+
setup.sh
43+
/bin/bash -c "source setup.sh"
44+
EOF
45+
46+
ENV VIRTUAL_ENV /opt/pyenv/dr6
47+
ENV PATH /opt/pyenv/dr6/bin:$PATH
48+
49+
# Use this specific version, others seem not to work
50+
RUN python -m pip install mpi4py==3.1.3

0 commit comments

Comments
 (0)