-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
executable file
·64 lines (51 loc) · 1.46 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM andrewosh/binder-base
MAINTAINER Ben Evans <[email protected]>
USER main
RUN conda config --add channels brian-team
RUN conda install --quiet --yes \
'pip=8.1*' \
#sphinx \
#coverage \
'matplotlib=1.5*' \
'cython=0.23*' \
'nose=1.3*' \
'brian2' \
'brian2tools'
RUN conda install --quiet --yes -n python3 \
'pip=8.1*' \
#sphinx \
#coverage \
'matplotlib=1.5*' \
'cython=0.23*' \
'nose=1.3*' \
'brian2' \
'brian2tools'
### Copy demonstration notebook and config files to home directory
WORKDIR $HOME
#USER root
RUN git clone git://github.com/brian-team/brian2.git
RUN mv brian2/tutorials _tutorials
RUN mv brian2/examples _examples
RUN rm -rf brian2
#RUN chown -R $USER:users $HOME/_tutorials
#RUN chown -R $USER:users $HOME/_examples
# Modify tutorials and genenate new notebooks from examples
COPY generate_notebooks.py .
RUN python generate_notebooks.py
RUN rm generate_notebooks.py
RUN chmod -R +x tutorials
RUN chmod -R +x examples
#RUN mkdir notebooks
RUN mv tutorials notebooks/tutorials
RUN mv examples notebooks/examples
USER root
RUN chown -R main:main $HOME/notebooks/tutorials
RUN chown -R main:main $HOME/notebooks/examples
USER main
RUN find ./notebooks -name '*.ipynb' -exec jupyter trust {} \;
#USER $USER
# Fix matplotlib font cache
RUN rm -rf /home/main/.matplolib
RUN rm -rf /home/main/.cache/matplolib
RUN rm -rf /home/main/.cache/fontconfig
RUN python -c "import matplotlib.pyplot as plt"