Skip to content

Instantly share code, notes, and snippets.

@daknuett
Last active May 15, 2020 11:58
Show Gist options
  • Save daknuett/ce9bef0e622b01a2ffb83bfbbd8c6166 to your computer and use it in GitHub Desktop.
Save daknuett/ce9bef0e622b01a2ffb83bfbbd8c6166 to your computer and use it in GitHub Desktop.
Dockerfile for gpt
FROM debian:latest
RUN apt-get update
RUN apt-get install -y gcc cmake libmpfr-dev libgmp-dev git build-essential autoconf
RUN apt-get install -y wget libssl-dev zlib1g-dev
RUN apt-get install -y rpm
RUN apt-get install -y python3 python3-pip
RUN wget https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.3-1.src.rpm
RUN rpm -i openmpi-4.0.3-1.src.rpm
WORKDIR /install
RUN git clone https://github.com/usqcd-software/c-lime.git
RUN (cd c-lime && ./autogen.sh && ./configure && make && make install)
RUN git clone https://github.com/ssolbUR/Grid --branch feature/gpt
RUN (cd Grid && ./bootstrap.sh)
RUN (cd Grid/ && ./configure CXXFLAGS=-fPIC --enable-precision=double --enable-simd=AVX --enable-comms=none && cd Grid && make version-cache Version.h && make && make install)
RUN cp Grid/grid-config /usr/local/bin
RUN pip3 install numpy
RUN pip3 install git+https://github.com/ssolbUR/gpt@feature/setup
#RUN pip3 install git+https://github.com/daknuett/gpt
RUN pip3 install notebook
RUN pip3 install sphinx
WORKDIR /gpt
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache
RUN git clone https://github.com/daknuett/gpt
WORKDIR /gpt/gpt/doc
RUN make html
VOLUME /notebooks
WORKDIR /notebooks
# Note that this does not work (in all cases). Manually copy the docs later.
RUN cp -r /gpt/gpt/docs /notebooks
CMD python3 -m notebook --allow-root --ip=0.0.0.0 --port=8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment