-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
74 lines (55 loc) · 2.8 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
# Dockerfile for running nbtools from a pip install
###################################################################################
## NOTE ##
## This Dockerfile mimics a pip install. The Dockerfile that mimics a dev ##
## install has moved to dev.Dockerfile. This prevents an issue where the dev ##
## Dockerfile runs out of memory when transpiling JS dependencies on Binder. ##
###################################################################################
# Pull the latest known good scipy notebook image from the official Jupyter stacks
FROM jupyter/scipy-notebook:2023-04-10 AS lab
MAINTAINER Thorin Tabor <[email protected]>
EXPOSE 8888
#############################################
## ROOT ##
## Install npm ##
#############################################
USER root
RUN apt-get update && apt-get install -y npm
#############################################
## $NB_USER ##
## Install libraries & config ##
#############################################
USER $NB_USER
RUN conda install -c conda-forge beautifulsoup4 blas bokeh cloudpickle dask dill h5py hdf5 jedi jinja2 libblas libcurl \
matplotlib nodejs numba numexpr numpy pandas patsy pickleshare pillow pycurl requests scikit-image scikit-learn \
scipy seaborn sqlalchemy sqlite statsmodels sympy traitlets vincent jupyter-archive jupyterlab-git && \
conda install plotly openpyxl sphinx && \
npm install -g yarn && \
pip install plotnine bioblend py4cytoscape ndex2 qgrid ipycytoscape firecloud globus-jupyterlab
RUN jupyter labextension install @g2nb/cy-jupyterlab && \
jupyter labextension install @g2nb/jupyterlab-theme && \
pip install g2nb
COPY ./config/overrides.json /opt/conda/share/jupyter/lab/settings/overrides.json
#############################################
## $NB_USER ##
## Launch lab by default ##
#############################################
ENV JUPYTER_ENABLE_LAB="true"
ENV TERM xterm
#############################################
## ROOT ##
## Install security measures ##
#############################################
FROM lab AS secure
USER root
RUN mv /usr/bin/wget /usr/bin/.drgf && \
# mv /usr/bin/curl /usr/bin/.cdfg && \
mkdir -p /tmp/..drgf/patterns
COPY GPNBAntiCryptominer/wget_and_curl/wget /usr/bin/wget
# COPY GPNBAntiCryptominer/wget_and_curl/curl /usr/bin/curl
COPY GPNBAntiCryptominer/wget_and_curl/encrypted_patterns.zip /tmp/..drgf/patterns/
RUN chmod a+x /usr/bin/wget && \
mkdir -p /tmp/.wg && \
chmod a+rw /tmp/.wg && \
chmod -R a+rw /tmp/..drgf/patterns
USER $NB_USER