Skip to content

Commit 7690bf5

Browse files
authored
Merge pull request #125 from computationalmodelling/docker-fixe
Fix docker build script
2 parents 1abc26a + f86a73c commit 7690bf5

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

docker/notebook/Dockerfile

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
FROM jupyter/scipy-notebook
2-
32
# where to install source
4-
ENV FIDIMAG_DIR $HOME/work/fidimag
5-
6-
RUN git clone https://github.com/computationalmodelling/fidimag.git
7-
WORKDIR $FIDIMAG_DIR
8-
3+
USER root
4+
RUN mkdir -p /io
5+
RUN chown $NB_USER /io
6+
RUN apt update && apt install -y cmake
7+
USER $NB_USER
8+
ENV FIDIMAG_DIR /io
9+
WORKDIR /io
10+
RUN git clone https://github.com/rpep/fidimag.git
11+
WORKDIR /io/fidimag
912
# install third party libraries from source
1013
RUN bash bin/install-fftw.sh
11-
RUN bash bin/install-sundials-2.5.sh
14+
RUN bash bin/install-sundials.sh
1215

1316
# install pyvtk
1417
RUN pip install pyvtk
@@ -17,6 +20,7 @@ RUN pip install cython --upgrade
1720

1821
# compile fidimag
1922
RUN python3 setup.py build_ext --inplace
23+
RUN pip install psutil
2024
ENV PYTHONPATH=$FIDIMAG_DIR
2125
ENV LD_LIBRARY_PATH=$FIDIMAG_DIR/local/lib
2226
WORKDIR $FIDIMAG_DIR/tests
@@ -26,12 +30,7 @@ RUN conda install --quiet --yes icu
2630

2731
# check that tests run okay
2832
RUN conda install --quiet --yes pytest
29-
RUN py.test -v
3033

3134
# /io will be mounted from the host system
32-
USER root
33-
RUN mkdir /io
34-
RUN chown -R $NB_USER /io
35-
USER $NB_USER
36-
3735
WORKDIR /io
36+

docker/notebook/Readme.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ To use it, you can try this:
1616

1717
3. Start the container using
1818

19-
docker run -v `pwd`:/io -d -p 30008:8888 fidimag/notebook
19+
docker run -v `pwd`:/io -p 30008:8888 fidimag/notebook
2020

2121
This will start a notebook server. You can see it in your browser at
22-
http://localhost:30008/ on Linux, or http://192.168.99.100:30008/ on Mac (you may
22+
http://localhost:30008/ on Linux and Mac (you may
2323
need to change this IP address if your docker VM is at a different address).
2424

25+
You will need to
2526
To run a shell instead of the notebook server, run:
2627

2728
docker run -v `pwd`:/io -ti fidimag/notebook bash

0 commit comments

Comments
 (0)