Skip to content

Commit

Permalink
Update install.md and Dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
ktkimit committed Dec 28, 2022
1 parent 0ad2479 commit ac32da1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
22 changes: 12 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@ MAINTAINER Ki-Tae Kim

USER root

# Install MUQ
RUN mkdir -p ./lib/muq && \
git clone -b v0.4.0 https://bitbucket.org/mituq/muq2.git && \
cd muq2/; mkdir build; cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/home/fenics/lib/muq -DMUQ_USE_PYTHON=ON -DNANOFLANN_EXTERNAL_SOURCE=https://github.com/jlblancoc/nanoflann/archive/refs/tags/v1.4.3.tar.gz ../ && \
make -j4 install && \
cd /home/fenics/ && \
rm -rf muq2

RUN apt-get -qq -y update && \
pip3 install --upgrade pip && \
pip3 install hippylib && \
pip3 install jupyter && \
pip3 install matplotlib && \
pip3 install h5py && \
Expand All @@ -19,22 +27,16 @@ USER fenics

WORKDIR /home/fenics/

# Install MUQ
RUN mkdir -p ./lib/muq && \
git clone --depth 1 https://bitbucket.org/mituq/muq2.git && \
cd muq2/; mkdir build; cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/home/fenics/lib/muq -DMUQ_USE_MPI=OFF -DMUQ_USE_PYTHON=ON ../ && \
make -j2 install && \
cd /home/fenics/ && \
rm -rf muq2
# Install the latest hippylib
RUN git clone https://github.com/hippylib/hippylib.git

# Install hippylib-muq interface
RUN git clone https://github.com/hippylib/hippylib2muq.git


# Set environmental variables
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/home/fenics/lib/muq/lib" \
PYTHONPATH="/home/fenics/lib/muq/python:/home/fenics/hippylib2muq"
PYTHONPATH="/home/fenics/lib/muq/python:/home/fenics/hippylib:/home/fenics/hippylib2muq"

USER root

Expand Down
6 changes: 3 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

`hIPPYlib-MUQ` builds on [hIPPYlib](https://github.com/hippylib/hippylib)
version 3.1.0 with [FEniCS](https://fenicsproject.org/) version 2019.1 and
[MUQ](https://bitbucket.org/mituq/muq2/src/master/) version 0.3.0.
[MUQ](https://bitbucket.org/mituq/muq2/src/master/) version 0.4.0.
Installations of these packages are summarized here, but please see the
detailed installation guides given in each github/bitbucket page.

Expand Down Expand Up @@ -42,13 +42,13 @@ docker run -ti --rm -v $(pwd):/home/fenics/shared \

Conda is also a very convenient way to set up an enviroment to use `hIPPYlib-MUQ`.
The script below builds a conda enviroment with `FEniCS 2019` and `MUQ`.
`hIPPYlib 3.0.0` is also downloaded and installed via `pip`.
`hIPPYlib 3.1.0` is also downloaded and installed via `pip`.


```
conda create -q -n hippylib2muq -c conda-forge fenics==2019.1.0 muq seaborn statsmodels
conda activate hippylib2muq
git clone --depth 1 --branch 3.0.0 https://github.com/hippylib/hippylib.git
git clone --depth 1 --branch 3.1.0 https://github.com/hippylib/hippylib.git
python hippylib/setup.py install
```
### Installation of MUQ from source codes (Expert user/MUQ developers)
Expand Down

0 comments on commit ac32da1

Please sign in to comment.