-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
92 lines (82 loc) · 4.7 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
FROM jupyter/base-notebook:lab-3.6.3
LABEL maintainer="Matt Wiese <matthew.wiese@cornell.edu>"
SHELL ["/bin/bash", "-c"]
# Install apt packages - for R packages built from source
USER root
RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends \
git \
less \
vim \
nano \
build-essential \
gfortran \
gcc \
libfontconfig1-dev \
libfreetype6-dev \
fonts-dejavu \
libfribidi-dev \
libharfbuzz-dev \
unixodbc \
unixodbc-dev \
make \
pandoc \
libicu-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
zlib1g-dev \
libssl-dev \
libxml2-dev \
libcurl4-openssl-dev \
libcairo2-dev \
libxt-dev \
libgeos-dev \
libudunits2-dev \
libgdal-dev \
gdal-bin \
libproj-dev \
libsqlite3-dev \
libudunits2-dev \
&& rm -rf /var/lib/apt/lists/*
USER ${NB_UID}
# Install Conda libraries from environment.yml into base environment
ADD environment.yml /tmp/environment.yml
RUN mamba env update --name base --file /tmp/environment.yml
# Install R libraries
ADD libraries.R /tmp/libraries.R
RUN Rscript /tmp/libraries.R
# Additional pip installs
# NOTE: JupyterHub package version must match deployed Hub version
# NOTE: Scheduler depends on Pydantic 1.x
RUN pip install --no-cache-dir jupyterhub==4.0.1 \
jupyter_scheduler \
pydantic==1.10
# Pull BrAPI Helper package from NAPB workshop file server and install it
RUN cd /tmp && wget https://demo.hub.maizegenetics.net/files/brapi_helper_installer.run && chmod +x brapi_helper_installer.run && ./brapi_helper_installer.run
# Pull Brandon's demo files
RUN cd /home/${NB_USER} && \
wget https://demo.hub.maizegenetics.net/files/napb_2023_bgh_demo_01.ipynb && \
wget https://demo.hub.maizegenetics.net/files/napb_2023_bgh_demo_02.ipynb && \
wget https://demo.hub.maizegenetics.net/files/napb_demo_data.tar.gz && \
tar -xvf napb_demo_data.tar.gz && \
rm napb_demo_data.tar.gz
# ILCI Templates
RUN cd /tmp && \
git clone https://github.com/agostof/ILCI-NotebookTemplates && \
mv ILCI-NotebookTemplates/src/templates/*_rTASSEL_*.ipynb /home/${NB_USER}/templates
# Install Kotlin 1.5 (for PHG)
RUN cd /tmp && \
wget https://github.com/JetBrains/kotlin/releases/download/v1.5.32/kotlin-compiler-1.5.32.zip && \
jar xvf kotlin-compiler-1.5.32.zip && \
chmod +x kotlinc/bin/kotlin && \
chmod +x kotlinc/bin/kotlinc && \
mv kotlinc /home/${NB_USER}/.kotlinc && \
echo "PATH=\$PATH:/home/${NB_USER}/.kotlinc/bin" >> /home/${NB_USER}/.profile
# Install faSize
RUN mkdir /home/${NB_USER}/.bin && \
wget -P /home/${NB_USER}/.bin https://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/faSize && \
chmod +x /home/${NB_USER}/.bin/faSize && \
echo "PATH=\$PATH:/home/${NB_USER}/.bin" >> /home/${NB_USER}/.profile
# Jupyter Notebook config
ADD jupyter_notebook_config.py /home/${NB_USER}/.jupyter/jupyter_notebook_config.py