Skip to content
Snippets Groups Projects
Commit 16cdb48c authored by Marco De Simone's avatar Marco De Simone
Browse files

Add oasys installer

parent ea881bba
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,12 @@ RUN chown -R $NB_UID:$NB_GID $HOME
ADD . /opt/install
RUN fix-permissions /opt/install
ADD ./install-oasys.sh /install-oasys.sh
RUN chmod +x /install-oasys.sh && /install-oasys.sh && rm /install-oasys.sh
ADD ./oasys/oasys.sh /usr/local/bin/oasys.sh
ADD ./oasys/oasys.desktop /usr/share/applications/oasys.desktop
ADD ./oasys/oasys-icon.xpm /usr/share/pixmaps/oasys-icon.xpm
RUN chmod +x /usr/local/bin/*.sh
USER $NB_USER
RUN cd /opt/install && \
conda env update -n base --file environment.yml
# Jupyter Desktop Server
# Jupyter Desktop with Oasys
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/yuvipanda/jupyter-desktop-server/master?urlpath=desktop)
Run XFCE (or other desktop environments) on a JupyterHub.
This is based on https://github.com/ryanlovett/nbnovnc and a fork of https://github.com/manics/jupyter-omeroanalysis-desktop
This is a fork based on this repo https://github.com/yuvipanda/jupyter-desktop-server.
If a `vncserver` executable is found in `PATH` it will be used, otherwise a bundled TightVNC server is run.
You can use this to install vncserver with support for other features, for example the [`Dockerfile`](./Dockerfile) in this repository installs TurboVNC for improved OpenGL support.
......@@ -40,4 +41,4 @@ Executing the command: jupyter notebook
*snip*
```
Now head to the URL shown and you will be greated with a XFCE desktop.
\ No newline at end of file
Now head to the URL shown and you will be greated with a XFCE desktop with Oasys too :)
#!/bin/bash
# ver 0.3
# 31.01.2022
# author Marco De Simone marco.desimone@ceric-eric.eu
export DEBIAN_FRONTEND=noninteractive
if [ -x $(which lsb_release) ] ; then
codename=`lsb_release -sc`
else # default fallback to bionic
codename="bionic"
fi
apt-get update
apt-get install -y curl
curl http://xmi-apt.tomschoonjans.eu/xmi.packages.key | sudo apt-key add -
distributor=`lsb_release -is| awk '{print tolower($0)}'`
apt-get install -y fontconfig-config \
fonts-dejavu-core \
libasound2 \
libasound2 \
libegl1 \
libegl1 \
libevdev2 \
libfontconfig1 \
libfontenc1 \
libfreetype6 \
libgl1-mesa-glx \
libinput-bin \
libinput10 \
libmtdev1 \
libnss-sss \
libpam-sss \
libpng16-16 \
libutempter0 \
libwacom-bin \
libwacom-common \
libwacom2 \
libxaw7 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-randr0 \
libxcb-render-util0 \
libxcb-shape0 \
libxcb-util1 \
libxcb-xinerama0 \
libxcb-xkb1 \
libxcomposite1 \
libxcursor1 \
libxcursor1 \
libxft2 \
libxi6 \
libxinerama1 \
libxkbcommon-x11-0 \
libxmu6 \
libxpm4 \
libxrandr2 \
libxss1 \
libxt6 \
libxtst6 \
libxv1 \
libxxf86dga1 \
locales \
locales-all \
python-sip \
sssd \
strace \
unzip \
vim \
wget \
x11-utils \
xbitmaps \
xdg-utils \
xkb-data \
xterm \
vim \
gtk3-nocsd
### from prepare script
# SCIPY
apt-get -y install libblas-dev liblapack-dev libatlas-base-dev build-essential
# MATPLOTLIB
apt-get -y install libfreetype6 libfreetype6-dev
apt-get install --reinstall libxcb-xinerama0
# XRAYLIB
apt-get -y install swig
apt-get -y install htop
source /opt/conda/bin/activate
conda create --name oasys python=3.7
conda activate oasys
conda install -c conda-forge -y xraylib
conda install -c anaconda -y numba six qt
conda env list
python -m pip install --no-cache-dir resources --upgrade
python -m pip install --no-cache-dir numpy --upgrade
python -m pip install --no-cache-dir scipy --upgrade
python -m pip install --no-cache-dir matplotlib --upgrade
python -m pip install oasys1
cat > /tmp/reqs.txt <<EOF
LibWiser
WofryWiser
OASYS1-ShadowOui
OASYS1-SRW
OASYS1-XOPPY
OASYS1-Syned
OASYS1-WOFRY
OASYS1-ELETTRA-Extensions
OASYS1-OasysWiser
OASYS1-Panosc
EOF
# ho tolto
#OASYS1-XRayServer
# 21/09 - remove obsolete OASYS1-WISEr package
#OASYS1-WISEr
python -m pip install --no-cache-dir -r /tmp/reqs.txt
#echo ". /etc/profile.d/oasysenv.sh" >> ~/.bashrc && \
#echo ". /etc/profile.d/oasysenv.sh" >> /etc/bash.bashrc
apt-get remove --purge -y g++-7 gcc-7 manpages manpages*dev build-essential\
&& apt-get purge -y lib*-dev \
&& apt-get -y clean
find /opt/conda/ -follow -type f -name '*.a' -delete && \
find /opt/conda/ -follow -type f -name '*.js.map' -delete && \
find /opt/conda/ -follow -type f -name '*.pyc' -delete && \
find /opt/conda/ -follow -type f -name '*.js.map' -delete &&\
#find /opt/conda/lib/python*/site-packages/bokeh/server/static -follow -type f -name '*.js' ! -name '*.min.js' -delete
rm -rf /root/.cache/pip
oasys/oasys-icon.png

111 KiB

source diff could not be displayed: it is too large. Options to address this: view the blob.
[Desktop Entry]
Version=1.0
Type=Application
Name=Oasys
GenericName=Oasys
Comment=Oasys - OrAnge SYnchrotron Suite
Exec=/usr/local/bin/oasys.sh
Icon=/usr/share/pixmaps/oasys-icon.xpm
Terminal=false
Categories=Education;Science;Physics;
MimeType=text/python
#!/bin/bash
export QT_X11_NO_MITSHM=1
export QT_XCB_GL_INTEGRATION=xcb_egl
source /opt/conda/bin/activate
conda activate oasys
python -m oasys.canvas -l4 --force-discovery
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment