Skip to content
Snippets Groups Projects
Commit 69331fde authored by Florian Dobener's avatar Florian Dobener
Browse files

Merge branch 'fiji-abtem-webtop-draft' into 'develop'

Fiji abtem webtop draft

See merge request !77
parents 0a5693cc abf25eac
No related branches found
No related tags found
1 merge request!77Fiji abtem webtop draft
#!/usr/bin/with-contenv bash
echo "/usr/local/miniconda3/bin/conda run -n base jupyter-lab $CWD" > /config/.config/openbox/autostart
%% Cell type:markdown id:88054eb2 tags:
![FAIRmat](FAIRmat_S.png)
%% Cell type:markdown id:9ecf3020 tags:
# abtem-webtop container cheatsheet
%% Cell type:markdown id:4091c1e2 tags:
The abtem-webtop container provides preinstalled and configured software for<br>
ab-initio-guided image simulation in the field of electron microscopy.<br>
The container contains the following tools:<br>
* VESTA by K. Momma and F. Izumi (https://doi.org/10.1107/S0021889811038970) is a GUI tool for creating crystal structures.<br>
* GPAW by J. J. Mortensen, E. J. Enkovaara et al. (https://iopscience.iop.org/article/10.1088/0953-8984/22/25/253202)<br>
an projector augmented-wave electronic structure code.<br>
* abTEM by J. Madsen et al. (https://open-research-europe.ec.europa.eu/articles/1-24) a tool for<br>
simulating transmission electron microscopy images.<br>
***
%% Cell type:markdown id:69238a64 tags:
# Getting started with VESTA
%% Cell type:markdown id:6e324fa1 tags:
VESTA is available under /home/vesta/VESTA/VESTA. The GUI can be started by opening a terminal by clicking a terminal<br>
panel on the right part of the jupyter-lab screen. The following command line call will start VESTA:<br>
%% Cell type:code id:5fd98af7 tags:
``` python
! /home/vesta/VESTA/VESTA
```
%% Cell type:markdown id:1aa22278 tags:
## Getting started with gpaw and abTEM
%% Cell type:markdown id:49e09d74-b0d6-4512-8929-38fd715d3948 tags:
This is a draft version of the container, created for testing and debugging purposes.<br>
Further descriptions should be placed here once the container has been finalized.<br>
# recipe to create the nomad-remote-tools-hub ewr_abinit_em_webtop container via a dockerfile
FROM gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-remote-tools-hub/webtop
# for testing the container locally without running in oauth errors
# FROM ghcr.io/linuxserver/webtop:amd64-ubuntu-openbox-version-e1079163
# FROM ghcr.io/linuxserver/webtop:amd64-ubuntu-xfce-version-c603dc47
# start of borrowed from gitlabmpcdf customized webtop
# ENV CUSTOM_PORT=8888
# ENV PUID=1000
# ENV PGID=1000
# ports and volumes
# EXPOSE 8888
# VOLUME /config
# end of borrowed from north webtop
USER root
# ### set the environment already, knowing where miniconda will be installed
ENV PATH=/usr/local/miniconda3/bin:$PATH
RUN mkdir -p /home \
&& mkdir -p /home/vesta \
&& mkdir -p /home/gpaw \
&& mkdir -p /home/abtem
COPY Cheatsheet.ipynb FAIRmat_S.png /home/
COPY 02-exec-cmd /config/custom-cont-init.d/02-exec-cmd
# install operating system dependencies
RUN apt update \
&& apt-get install -y git=1:2.25.1-1ubuntu3.5 \
&& apt-get install -y unzip=6.0-25ubuntu1 \
&& apt-get install -y wget=1.20.3-1ubuntu2 \
&& apt-get install -y libgtk-3-dev=3.24.20-0ubuntu1.1 \
&& apt-get install -y build-essential=12.8ubuntu1.1 \
&& apt-get install -y cmake=3.16.3-1ubuntu1 \
&& apt-get install -y libglu1-mesa-dev=9.0.1-1build1 \
&& apt-get install -y libblas-dev=3.9.0-1build1 \
&& apt-get install -y liblapack-dev=3.9.0-1build1 \
&& apt-get install -y libxc-dev=4.3.4-1build1 \
&& wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& chmod +x Miniconda3-latest-Linux-x86_64.sh \
&& bash ./Miniconda3-latest-Linux-x86_64.sh -b -p /usr/local/miniconda3 \
&& rm -f Miniconda3-latest-Linux-x86_64.sh \
&& cd /home \
&& conda config --add channels conda-forge \
&& conda config --set channel_priority strict \
&& conda install python=3.10.6 ipykernel=6.16.0 jupyterlab=3.4.7 nodejs=18.9.0 \
&& pip install jupyterlab_h5web[full]==6.0.1 \
&& pip install gpaw \
&& pip install abtem \
&& conda clean -afy \
&& chown -R ${PUID}:${PGID} /usr/local/miniconda3 \
&& cd /home/vesta \
&& wget https://jp-minerals.org/vesta/archives/3.5.7/VESTA-gtk3.tar.bz2 \
&& tar -xvf VESTA-gtk3.tar.bz2 \
&& rm -f VESTA-gtk3.tar.bz2 \
&& chown -R ${PUID}:${PGID} /home
WORKDIR /home
# how to call this container for development purposes for example
# docker run -p 3000:8888 ewr-abinit-em-webtop
docker/abtem/FAIRmat_S.png

6.73 KiB

#!/usr/bin/with-contenv bash
echo "/usr/local/miniconda3/bin/conda run -n base jupyter-lab $CWD" > /config/.config/openbox/autostart
%% Cell type:markdown id:88054eb2 tags:
![FAIRmat](FAIRmat_S.png)
%% Cell type:markdown id:9ecf3020 tags:
# fiji-webtop container cheatsheet
%% Cell type:markdown id:4091c1e2 tags:
The fiji-webtop container provides preinstalled and configured imagej and fiji imagej versions<br>
for preparing data from electron microscopy experiment for e.g. focal series reconstruction.<br>
ImageJ is configured with several plug-ins from the SALVE microscopy group in Ulm (tools<br>
which where developed by Michael Mohn et al. in Prof. Ute Kaiser's group). Specifically,<br>
https://github.com/mmohn/SER_Reader<br>
https://github.com/mmohn/Stack_Alignment<br>
***
%% Cell type:markdown id:69238a64 tags:
# Getting started with imagej
%% Cell type:markdown id:6e324fa1 tags:
imagej (https://imagej.net/) is available under /home/imagej/ImageJ. The GUI can be started by opening a terminal by clicking a terminal<br>
panel on the right part of the jupyter-lab screen. The following command line call will start imagej:<br>
%% Cell type:code id:5fd98af7 tags:
``` python
! /home/imagej/ImageJ/ImageJ
```
%% Cell type:markdown id:1aa22278 tags:
## Getting started with fiji
%% Cell type:markdown id:49e09d74-b0d6-4512-8929-38fd715d3948 tags:
Fiji (https://imagej.net/software/fiji/downloads) is an extension of the imagej image processing suite with many additional plug-ins.<br>
The tool is available under /home/fiji/Fiji.app. The GUI can be started by opening a terminal by clicking a terminal panel<br>
on the right part of the jupyter-lab screen. The following command line call will start fiji:<br>
%% Cell type:code id:3e9edd09-e4ee-4163-8138-b33311fe8f8c tags:
``` python
! /home/fiji/Fiji.app/ImageJ-linux64
```
%% Cell type:code id:503e63a2-4586-4365-84bd-08692c3b2324 tags:
``` python
```
# # recipe to create the nomad-remote-tools-hub apmtools container via a dockerfile
FROM gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-remote-tools-hub/webtop
# for testing the container locally without running in oauth errors
# FROM ghcr.io/linuxserver/webtop:amd64-ubuntu-openbox-version-e1079163
# FROM ghcr.io/linuxserver/webtop:amd64-ubuntu-xfce-version-c603dc47
# # found that newest system python is 3.8.something
# # rest should come only from and be managed through (mini)conda not pip!
# # start of borrowed from gitlabmpcdf customized webtop
# ENV CUSTOM_PORT=8888
# ENV PUID=1000
# ENV PGID=1000
# ports and volumes
# EXPOSE 8888
# VOLUME /config
# # end of borrowed from north webtop
USER root
# not update but upgrade, otherwise depending on when the container is build a particular version may no longer
# be available as a consequence of which the following specifically-versioned packages will not be installable
# set the environment already, knowing where miniconda will be installed
ENV PATH=/usr/local/miniconda3/bin:$PATH
RUN mkdir -p /home \
&& mkdir -p /home/imagej/ImageJ/plugins/FAIRmat \
&& mkdir -p /home/fiji/Fiji.app
# get Michael Mohn et al. plugins for ImageJ (these have been developed for imagej)
# https://github.com/mmohn/SER_Reader.git (using e7828be)
# https://github.com/mmohn/Stack_Alignment.git (1563c59)
# we are using here the files from the respective repository commits as indicated in the brackets
# the individual plug-in *.java source code files in this repository were then compiled using Compile and run
# on a Linux instance of the same imagej version as is unzip in this container
# the compiled plug-ins have been made available in /home/imagej/ImageJ/plugins/FAIRmat
# in ImageJ, we have done the compilation on the same ImageJ version which is used in this
# container, using the Compile and Run, the resulting java and class files are copied into the image
COPY Cheatsheet.ipynb FAIRmat_S.png /home/
COPY Alignment_Roi.class Prealign_Stack.class SER_Reader.class /home/imagej/ImageJ/plugins/FAIRmat/
COPY 02-exec-cmd /config/custom-cont-init.d/02-exec-cmd
# install operating system dependencies
# get and install miniconda and customize it into a specific base environment
RUN apt update \
&& apt-get install -y git=1:2.25.1-1ubuntu3.5 \
&& apt-get install -y unzip=6.0-25ubuntu1 \
&& apt-get install -y wget=1.20.3-1ubuntu2 \
&& apt-get install -y libglu1-mesa-dev=9.0.1-1build1 \
&& apt-get install -y build-essential=12.8ubuntu1.1 \
&& apt-get install -y cmake=3.16.3-1ubuntu1 \
&& wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& chmod +x Miniconda3-latest-Linux-x86_64.sh \
&& bash ./Miniconda3-latest-Linux-x86_64.sh -b -p /usr/local/miniconda3 \
&& rm -f Miniconda3-latest-Linux-x86_64.sh \
&& cd /home \
&& conda config --add channels conda-forge \
&& conda config --set channel_priority strict \
&& conda install python=3.10.6 ipykernel=6.16.0 jupyterlab=3.4.7 nodejs=18.9.0 \
&& pip install jupyterlab_h5web[full]==6.0.1 \
&& conda clean -afy \
&& chown -R ${PUID}:${PGID} /usr/local/miniconda3 \
&& cd /home/fiji \
&& wget https://downloads.imagej.net/fiji/archive/20220922-1417/fiji-linux64.zip \
&& unzip fiji-linux64.zip \
&& rm -f fiji-linux64.zip \
&& cd /home/imagej \
&& wget https://wsr.imagej.net/distros/linux/ij153-linux64-java8.zip \
&& unzip ij153-linux64-java8.zip \
&& rm -f ij153-linux64-java8.zip \
&& chown -R ${PUID}:${PGID} /home
# customize the webtop autostart to spin up jupyter-lab
WORKDIR /home
File added
File added
File added
docker/fiji/FAIRmat_S.png

6.73 KiB

......@@ -117,6 +117,19 @@
}
]
},
"fiji-container": {
"short_description": "ImageJ and Fiji for image processing",
"description": "ImageJ and Fiji with amongst others several electron-microscopy specific plug-ins",
"image": "gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-remote-tools-hub/fiji-webtop",
"icon": "jupyter_logo.svg",
"mount_path": "/config",
"maintainer": [
{
"name": "Markus Kühbach",
"email": "markus.kuehbach@physik.hu-berlin.de"
}
]
},
"frwr": {
"short_description": "Inline electron holography by C. Koch",
"description": "FRWR3 in-line holography/focus series reconstruction code",
......@@ -129,5 +142,18 @@
"email": "markus.kuehbach@physik.hu-berlin.de"
}
]
},
"abtem": {
"short_description": "Electronic structure supported image simulation for transmission electron microscopy.",
"description": "VESTA, GPAW, and abTEM configured in one container for simulating images and diffraction patterns in transmission electron microscopy",
"image": "gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-remote-tools-hub/abtem-webtop",
"icon": "jupyter_logo.svg",
"mount_path": "/config",
"maintainer": [
{
"name": "Markus Kühbach",
"email": "markus.kuehbach@physik.hu-berlin.de"
}
]
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment