Loading Incident_beam_MCstas/Docker_file 0 → 100644 +73 −0 Original line number Diff line number Diff line FROM quay.io/jupyter/base-notebook:ubuntu-22.04 USER root ### Install XFCE and simulation dependencies RUN 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 \ wget \ curl \ build-essential ### Install TurboVNC 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/ ### Install McStas (official 3.4 Debian package) RUN curl -fsSL https://mcstas.org/downloads/McStas-3.4.gpg.key | gpg --dearmor -o /usr/share/keyrings/mcstas-archive-keyring.gpg && \ echo "deb [signed-by=/usr/share/keyrings/mcstas-archive-keyring.gpg] http://downloads.mcstas.org/debian stable main" > /etc/apt/sources.list.d/mcstas.list && \ apt update && apt install -y mcstas-suite ### Fix permissions for user home RUN chown -R $NB_UID:$NB_GID $HOME ### Optional: add your installation files (e.g., env) ADD . /opt/install RUN fix-permissions /opt/install ### Default instrument file setup COPY default.instr /opt/mcstas_sim/ COPY run_mcstas.sh /opt/mcstas_sim/ RUN chmod +x /opt/mcstas_sim/run_mcstas.sh ### Run simulation at container startup (optional) # To run manually instead, comment the next line CMD ["bash", "/opt/mcstas_sim/run_mcstas.sh"] USER $NB_USER ### Activate environment and install python deps RUN cd /opt/install && \ conda env update -n base --file environment.yml || true ### Enable McStas Python tools (optional) RUN /opt/conda/bin/mcdoc -i ### Enable GitPuller (for lab use) RUN pip install nbgitpuller RUN jupyter labextension enable nbgitpuller Loading
Incident_beam_MCstas/Docker_file 0 → 100644 +73 −0 Original line number Diff line number Diff line FROM quay.io/jupyter/base-notebook:ubuntu-22.04 USER root ### Install XFCE and simulation dependencies RUN 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 \ wget \ curl \ build-essential ### Install TurboVNC 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/ ### Install McStas (official 3.4 Debian package) RUN curl -fsSL https://mcstas.org/downloads/McStas-3.4.gpg.key | gpg --dearmor -o /usr/share/keyrings/mcstas-archive-keyring.gpg && \ echo "deb [signed-by=/usr/share/keyrings/mcstas-archive-keyring.gpg] http://downloads.mcstas.org/debian stable main" > /etc/apt/sources.list.d/mcstas.list && \ apt update && apt install -y mcstas-suite ### Fix permissions for user home RUN chown -R $NB_UID:$NB_GID $HOME ### Optional: add your installation files (e.g., env) ADD . /opt/install RUN fix-permissions /opt/install ### Default instrument file setup COPY default.instr /opt/mcstas_sim/ COPY run_mcstas.sh /opt/mcstas_sim/ RUN chmod +x /opt/mcstas_sim/run_mcstas.sh ### Run simulation at container startup (optional) # To run manually instead, comment the next line CMD ["bash", "/opt/mcstas_sim/run_mcstas.sh"] USER $NB_USER ### Activate environment and install python deps RUN cd /opt/install && \ conda env update -n base --file environment.yml || true ### Enable McStas Python tools (optional) RUN /opt/conda/bin/mcdoc -i ### Enable GitPuller (for lab use) RUN pip install nbgitpuller RUN jupyter labextension enable nbgitpuller