diff --git a/.gitignore b/.gitignore index 48dbc6158084be8e4c9ecfa21a4e878de5bd807c..99e70dae5d25157ea9d85931c9feb41849e344b4 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ Docker/graphdb-free.* Docker/graphdb-free* graphdb-free P_* +Docker/graphdb/graphdb-free* diff --git a/Docker/docker-compose.yml b/Docker/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..6d395c4fb169b332b3c543f3f46d7ca7e53d1ba3 --- /dev/null +++ b/Docker/docker-compose.yml @@ -0,0 +1,32 @@ +version: "3" +services: + jupyter: + container_name: jupyter + image: docker-registry.wur.nl/unlock/notebook:jupyter + command: start.sh jupyter lab + ports: + - "8888:8888" + volumes: + - unlock-data:/home/jovyan + rstudio: + container_name: rstudio + image: docker-registry.wur.nl/unlock/notebook:rstudio + ports: + - "8787:8787" + volumes: + - unlock-data:/home/rstudio + environment: + - PASSWORD=57Grv3xFc2E96nsehAJ4 + graphdb: + container_name: graphdb + image: docker-registry.wur.nl/unlock/notebook:graphdb + ports: + - "7200:7200" + +volumes: + unlock-data: + driver: local + driver_opts: + o: bind + type: none + device: ~/unlock-data \ No newline at end of file diff --git a/Docker/docker_install.sh b/Docker/docker_install.sh index 927a4b2371cc5ff22b00fb6140deb1eab3424880..815f94a3fd4e53aca73ef4d9e809247a42fa0c5a 100755 --- a/Docker/docker_install.sh +++ b/Docker/docker_install.sh @@ -3,34 +3,41 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd ${DIR} -# Obtain graphdb as wget is not working for some reason in docker 20.04 -# wget "http://download.ontotext.com/owlim/a2aac65e-d5a3-11ea-a9ef-42843b1b6b38/graphdb-free-9.3.3-dist.zip?utm_campaign=GraphDB&utm_medium=email&_hsmi=92670193&_hsenc=p2ANqtz-_6wkDuK_P0VgpDSok777zvpgRNpNQiCM6FBlL02vS_quif1tMbxJL7yUIn-IWP3XupE5PrZNfSR1uX_xvP2ykvQqLCTQ&utm_content=92670193&utm_source=hs_email" -O graphdb.zip -# unzip graphdb.zip -# rm graphdb.zip +# To build the jupyter docker image +docker build -t docker-registry.wur.nl/unlock/notebook:jupter ./jupyter/ -# To build the docker image -docker build -t docker-registry.wur.nl/unlock/notebook . +ret=$? -if [[ ${ret} != 0 ]]; then - echo "Docker build failed stopping now" +if [[ ${ret} -eq 0 ]]; then + docker push docker-registry.wur.nl/unlock/notebook:jupyter +else + echo "Docker jupyter build failed stopping now "${ret} exit 1 fi -# To run the test, obtain exit code and if all went well upload the file -docker run --rm -p 8888:8888 -p 7200:7200 docker-registry.wur.nl/unlock/notebook + +# To build the rstudio docker image +docker build -t docker-registry.wur.nl/unlock/notebook:rstudio ./rstudio/ ret=$? if [[ ${ret} -eq 0 ]]; then - # To upload the docker image - echo "uploading" - docker push docker-registry.wur.nl/unlock/notebook + docker push docker-registry.wur.nl/unlock/notebook:rstudio +else + echo "Docker rstudio build failed stopping now" + exit 1 fi -if [[ ${ret} -ne 0 ]]; then - # To upload the docker image - echo "Test failed" -fi -# Cleaning up the generic file -# rm -rf Generic \ No newline at end of file + +# To build the graphdb docker image +docker build -t docker-registry.wur.nl/unlock/notebook:graphdb ./graphdb/ + +ret=$? + +if [[ ${ret} -eq 0 ]]; then + docker push docker-registry.wur.nl/unlock/notebook:graphdb +else + echo "Docker graphdb build failed stopping now" + exit 1 +fi \ No newline at end of file diff --git a/Docker/graphdb/Dockerfile b/Docker/graphdb/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..6c1886ad2ccf36392b97a56a5fb48d66574ab2a3 --- /dev/null +++ b/Docker/graphdb/Dockerfile @@ -0,0 +1,42 @@ +# Base image +FROM ubuntu:18.04 + +# Metadata +LABEL base.image="openjdk" +LABEL version="1" +LABEL software="GraphDB 1.0" +LABEL software.version="1.0.0" +LABEL description="GraphDB image" +LABEL website="https://m-unlock.gitlab.io" +LABEL documentation="https://m-unlock.gitlab.io" +LABEL license="NA" +LABEL tags="linked data" + +# Silence debconf messages +RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections + +### Ensure java is available +# Install Java via sdkman +RUN apt-get update && \ + apt-get -qq -y install \ + curl \ + unzip \ + zip &&\ + rm /bin/sh && ln -s /bin/bash /bin/sh &&\ + apt-get -qq -y install curl &&\ + curl -s https://get.sdkman.io | bash &&\ + chmod a+x "$HOME/.sdkman/bin/sdkman-init.sh" +RUN source "$HOME/.sdkman/bin/sdkman-init.sh" &&\ + sdk install java 11.0.9.hs-adpt + +ENV PATH="/root/.sdkman/candidates/maven/current/bin:/root/.sdkman/candidates/java/current/bin:/root/.sdkman/candidates/gradle/current/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PATH}" + +# Set GraphDB Max and Min Heap size +ENV GDB_HEAP_SIZE="4g" + +# Add Graphdb +ADD graphdb-free-9.6.0 graphdb-free +# Graphdb port +EXPOSE 7200 + +CMD ["/graphdb-free/bin/graphdb"] diff --git a/Docker/jupyter/Dockerfile b/Docker/jupyter/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..c1237cb978d3f8a914eae80d01258e5a5d392c94 --- /dev/null +++ b/Docker/jupyter/Dockerfile @@ -0,0 +1,31 @@ +# Base Image +FROM jupyter/datascience-notebook + +# Metadata +LABEL base.image="Notebook:latest" +LABEL version="1" +LABEL software="Notebook 1.0" +LABEL software.version="1.0.0" +LABEL description="iRods Jupyter Notebook infrastructure" +LABEL website="https://m-unlock.gitlab.io" +LABEL documentation="https://m-unlock.gitlab.io" +LABEL license="NA" +LABEL tags="Notebook" + +### Change to root to install dependencies +# USER root + +### Latest version of irods client only available via pip install +RUN pip install python-irodsclient + +### all python packages +RUN pip install distance python-irodsclient SPARQLWrapper + +### Jupyter extensions under the right user +RUN pip install jupyter_contrib_nbextensions +RUN jupyter contrib nbextension install --user +RUN jupyter nbextensions_configurator enable --user +# RUN jupyter labextension install @wallneradam/output_auto_scroll + +# docker build -t docker-registry.wur.nl/unlock/notebook:jupyter . +# docker run -it --rm -p 8888:8888 docker-registry.wur.nl/unlock/notebook:jupyter start.sh jupyter lab diff --git a/Docker/rstudio/Dockerfile b/Docker/rstudio/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..fb780b4a662f09e9d979d8ce5c6dbc9130331a8d --- /dev/null +++ b/Docker/rstudio/Dockerfile @@ -0,0 +1,28 @@ +# Base Image +FROM rocker/rstudio + +# Metadata +LABEL base.image="NotebookRstudio:latest" +LABEL version="1" +LABEL software="Notebook 1.0" +LABEL software.version="1.0.0" +LABEL description="Rstudio Notebook infrastructure" +LABEL website="https://m-unlock.gitlab.io" +LABEL documentation="https://m-unlock.gitlab.io" +LABEL license="NA" +LABEL tags="Notebook" + +RUN install2.r ape gridExtra picante data.table RColorBrewer DT reshape reshape2 magrittr markdown ggpubr tibble pheatmap dplyr viridis devtools rmdformats intergraph network igraph ggplot2 gridExtra knitr plyr vegan dplyr ggrepel ggnetwork ade4 rmarkdown formatR caTools plotly rio ggfortify GGally +# phyloseq microbiome phangorn genefilter +# RUN R -e "options(repos = list(CRAN = 'http://cran.r-project.org')); install.packages(c('DT', 'reshape', 'reshape2', 'magrittr', 'markdown', 'ggpubr'))" +# RUN R -e "options(repos = list(CRAN = 'http://cran.r-project.org')); install.packages(c('tibble', 'pheatmap', 'dplyr', 'viridis', 'devtools', 'rmdformats'))" +# RUN R -e "options(repos = list(CRAN = 'http://cran.r-project.org')); install.packages(c('intergraph', 'network', 'igraph', 'ggplot2', 'gridExtra', 'knitr'))" +# RUN R -e "options(repos = list(CRAN = 'http://cran.r-project.org')); install.packages(c('plyr', 'vegan', 'dplyr', 'ggrepel', 'ggnetwork', 'ade4', 'rmarkdown'))" +# RUN R -e "options(repos = list(CRAN = 'http://cran.r-project.org')); install.packages(c('formatR', 'caTools', 'plotly', 'rio', 'ggfortify', 'GGally'))" +RUN R -e "options(repos = list(CRAN = 'http://cran.r-project.org')); install.packages('BiocManager'); BiocManager::install(version = '3.12')" +RUN R -e "options(repos = list(CRAN = 'http://cran.r-project.org')); BiocManager::install(c('phyloseq', 'microbiome', 'phangorn', 'genefilter'))" +# RUN R -e "options(repos = list(CRAN = 'http://cran.r-project.org')); require(devtools); install_version('foreign', version = '0.8-76', repos = 'http://cran.us.r-project.org')" +# RUN R -e "options(repos = list(CRAN = 'http://cran.r-project.org')); install.packages('rio')" +# # RUN R -e "options(repos = list(CRAN = 'http://cran.r-project.org')); devtools::install_github('microsud/microbiomeutilities')" +# # RUN R -e "options(repos = list(CRAN = 'http://cran.r-project.org')); devtools::install_github('zdk123/SpiecEasi')" +# RUN R -e "options(repos = list(CRAN = 'http://cran.r-project.org')); devtools::install_github('briatte/ggnet')" \ No newline at end of file