This repository has been archived by the owner on Aug 18, 2023. It is now read-only.
forked from McStasMcXtrace/mcstas-binder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
73 lines (61 loc) · 3.62 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
65
66
67
68
69
70
71
72
FROM jupyter/base-notebook:4d70cf8da953
USER root
# get McCode debian packages: release release 3.3
RUN wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-3.3-deb64.deb \
&& wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-comps-3.3-deb64.deb \
&& wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-manuals-3.3-deb64.deb \
&& wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-tools-matlab-mcplot-3.3-deb64.deb \
&& wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-tools-perl-cmdline-3.3-deb64.deb \
&& wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-tools-python-mccodelib-3.3-deb64.deb \
&& wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-tools-python-mcdisplay-pyqtgraph-3.3-deb64.deb \
&& wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-tools-python-mcdisplay-webgl-3.3-deb64.deb \
&& wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-tools-python-mcdoc-3.3-deb64.deb \
&& wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-tools-python-mcgui-3.3-deb64.deb \
&& wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-tools-python-mcplot-matplotlib-3.3-deb64.deb \
&& wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-tools-python-mcplot-pyqtgraph-3.3-deb64.deb \
&& wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-tools-python-mcrun-3.3-deb64.deb \
&& wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-ncrystal-3.3-deb64.deb \
&& wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-tools-python-mcresplot-3.3-deb64.deb \
&& wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-tools-python-mcdisplay-mantid-3.3-deb64.deb \
&& wget http://packages.mccode.org/debian/dists/stable/main/binary-amd64/mcstas-mcpl-3.3-deb64.deb \
&& apt update && apt install -y software-properties-common && add-apt-repository ppa:mozillateam/ppa \
&& echo 'Package: *' > /etc/apt/preferences.d/mozilla-firefox \
&& echo Pin: release o=LP-PPA-mozillateam >> /etc/apt/preferences.d/mozilla-firefox \
&& echo Pin-Priority: 1001 >> /etc/apt/preferences.d/mozilla-firefox \
&& apt-get install -y dbus-x11 \
xfce4 \
xfce4-panel \
xfce4-session \
xfce4-settings \
xorg \
xubuntu-icon-theme \
view3dscene \
python3-pyqt5 \
xdg-utils \
gedit \
gedit-plugins \
evince \
gnuplot \
octave \
libopenmpi-dev \
libnexus1 \
libnexus-dev \
git \
firefox
# install McStas, and make sure we use the python from the system for it, and let conda-based Python modules be used from with McStas
RUN apt install -y ./*.deb && rm *.deb && ln -s /opt/conda /usr/share/mcstas/3.3/miniconda3
# Remove light-locker to prevent screen lock
RUN wget 'https://sourceforge.net/projects/turbovnc/files/2.2.5/turbovnc_2.2.5_amd64.deb/download' -O turbovnc_2.2.5_amd64.deb && \
apt-get install -y -q ./turbovnc_2.2.5_amd64.deb && \
apt-get remove -y -q light-locker xfce4-screensaver && \
rm ./turbovnc_2.2.5_amd64.deb && \
ln -s /opt/TurboVNC/bin/* /usr/local/bin/
# apt-get may result in root-owned directories/files under $HOME
RUN chown -R $NB_UID:$NB_GID $HOME
ADD . /opt/install
RUN fix-permissions /opt/install
USER $NB_USER
RUN cd /opt/install && \
mamba env update -n base --file environment.yml && \
mamba init
COPY McStasScript/configuration.yaml /opt/conda/lib/python3.10/site-packages/mcstasscript/