diff --git a/container/Singularity b/container/Singularity index 004c139ef5b6f8609e9649036e6844c71db0a21d..7808b57c3e5af47220854b36e40852c83987a17b 100644 --- a/container/Singularity +++ b/container/Singularity @@ -13,27 +13,23 @@ ln -sf /bin/bash /bin/sh # INSTALL SYSTEM DEPS ##################### -apt-get update -y && apt-get install -y python3-pip +apt-get update -y && apt-get install -y ipython3 jupyter python3-pip pip3 install ipywidgets==7.6.0 pip3 install nglview \ - ipython \ - jupyter + six + +# SET LOCALE +############ +echo "LC_ALL=en_US.UTF-8" >> /etc/environment +echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen +echo "LANG=en_US.UTF-8" > /etc/locale.conf +locale-gen en_US.UTF-8 # SETUP IPYTHON / JUPYTER ######################### -export IPYTHONDIR="/usr/local/share/ipython" -export JUPYTER_CONFIG_DIR="/usr/local/etc/jupyter" export JUPYTER_PATH="/usr/local/share/jupyter" -export JUPYTER_RUNTIME_DIR="/tmp/jupyter_runtime" -mkdir -p /usr/local/share/ipython mkdir -p $JUPYTER_PATH -mkdir -p $JUPYTER_RUNTIME_DIR -mkdir -p $JUPYTER_CONFIG_DIR mkdir -p $JUPYTER_PATH/kernels/ost-kernel -chmod a+rw -R /usr/local/share/ipython -chmod a+rw -R $JUPYTER_PATH -chmod a+rw -R $JUPYTER_CONFIG_DIR -chmod a+rw -R $JUPYTER_RUNTIME_DIR cat > $JUPYTER_PATH/kernels/ost-kernel/kernel.json <<EOF { "display_name": "OST", @@ -43,7 +39,7 @@ cat > $JUPYTER_PATH/kernels/ost-kernel/kernel.json <<EOF "-m", "ipykernel", "-f", "{connection_file}", "--InteractiveShellApp.exec_PYTHONSTARTUP=False", - "--InteractiveShellApp.exec_files=['/usr/local/lib64/python3.8/site-packages/ost/ost_startup.py']" + "--InteractiveShellApp.exec_files=/usr/local/lib64/python3.10/site-packages/ost/ost_startup.py" ], "env": { } @@ -60,13 +56,7 @@ export TEMP="/tmp" export TEMPDIR="/tmp" export TMPDIR="/tmp" export TMP="/tmp" -# As the Singularity mounts $HOME by default Jupyter and Ipython config files -# are moved to separate directories. Proper environmental variables are also -# set -export IPYTHONDIR="/usr/local/share/ipython" -export JUPYTER_CONFIG_DIR="/usr/local/etc/jupyter" export JUPYTER_PATH="/usr/local/share/jupyter" -export JUPYTER_RUNTIME_DIR="$TMPDIR/jupyter_runtime" %apprun ChemdictTool @@ -201,7 +191,7 @@ and goes to CWD. Thus this sould work as expected out of the box. # NOTEBOOK ENV ############################################################################## export DNG_ROOT=$OST_ROOT -export DNG_INITDIR=${DNG_ROOT}/lib64/python3.8/site-packages/ost +export DNG_INITDIR=${DNG_ROOT}/lib64/python3.10/site-packages/ost %apprun IPython @@ -261,9 +251,6 @@ load all necessary OST/ProMod3 components just like in the OST shell. We also en the nglview widget to interactively view molecular structures and trajectories. For more details on how to use nglview see http://nglviewer.org/nglview/latest/. -As the Singularity mounts $HOME by default Jupyter and Ipython config files -are moved to separate directories. Proper environmental variables are also set. - To list of all available options: singularity run --app Notebook <IMAGE> --help