-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile.save
57 lines (53 loc) · 2.07 KB
/
Dockerfile.save
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
FROM jupyter/pyspark-notebook
RUN uname -a
USER root
# Add essential packages
RUN apt-get update
RUN apt-get install -y build-essential libtool pkg-config autoconf automake git curl nano software-properties-common apt-transport-https
RUN apt-get install -y python-rpy2
# Docker
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
RUN sudo add-apt-repository "deb https://download.docker.com/linux/ubuntu xenial stable"
RUN apt-get update
RUN apt-cache policy docker-ce
RUN apt-get install docker-ce -y
RUN gpasswd -a jovyan docker
# Install the MS ODBC SQL driver
# https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server
#RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
#RUN curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
#RUN apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql unixodbc-dev
# Set locale
RUN apt-get update && apt-get install -y locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen
RUN usermod -a -G docker $NB_USER
RUN conda install -c r r-essentials r-rjson
# Update Node and NPM
RUN conda install -c conda-forge nodejs
RUN node --version
RUN npm --version
# Add password
COPY jupyter/jupyter_notebook_config.py /home/jovyan/.jupyter/
RUN chmod -R 777 /home/jovyan/
USER $NB_USER
# Install Scala kernel
#RUN git clone https://github.com/jupyter-scala/jupyter-scala.git
#WORKDIR /home/jovyan/jupyter-scala
#RUN ./jupyter-scala
#RUN jupyter kernelspec list
# Install Python requirements
COPY requirements.txt /home/jovyan/
RUN pip install --upgrade pip
RUN pip install pipenv
RUN conda install --yes --file /home/jovyan/requirements.txt
# Install NLTK
RUN python -c "import nltk; nltk.download('popular')"
# Custom styling
RUN mkdir -p /home/jovyan/.jupyter/custom
COPY custom/custom.css /home/jovyan/.jupyter/custom/
# NB extensions
RUN jupyter contrib nbextension install --user
RUN jupyter nbextensions_configurator enable --user
# Run the notebook
CMD ["/opt/conda/bin/jupyter", "lab"]