-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (33 loc) · 1.59 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
FROM continuumio/miniconda3
LABEL maintainer="Srinidhi Raghavendran [email protected]"
ARG http_proxy
ARG https_proxy
ENV http_proxy=${http_proxy}
ENV https_proxy=${https_proxy}
ENV JUPYTERHUB_IP=0.0.0.0
ENV JUPYTERHUB_PORT=8000
RUN apt-get update && apt-get install -y curl
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs
RUN echo "Node: " && node -v
RUN echo "NPM: " && npm -v
RUN npm install -g configurable-http-proxy
COPY environment.yml /app/environment.yml
WORKDIR /app
RUN conda env create -f environment.yml
RUN echo "source activate jupyterlab_env" >> ~/.bashrc
RUN /bin/bash -c "source activate jupyterlab_env && \
pip install jupyterhub notebook"
RUN /bin/bash -c "source activate jupyterlab_env && pip install -i https://test.pypi.org/simple/ cisco-theme-jupyter==1.1.0"
RUN /bin/bash -c "source activate jupyterlab_env && \
conda install -c conda-forge jupyterhub notebook jupyterlab"
RUN git clone https://github.com/jupyterhub/nativeauthenticator.git /home/nativeauthenticator
RUN /bin/bash -c "source activate jupyterlab_env && \
pip install -e /home/nativeauthenticator"
COPY jupyterhub_config.py /etc/jupyterhub/jupyterhub_config.py
COPY overrides.json /app/overrides.json
RUN mkdir -p /opt/conda/envs/jupyterlab_env/share/jupyter/lab/settings \
&& cp /app/overrides.json /opt/conda/envs/jupyterlab_env/share/jupyter/lab/settings/overrides.json
COPY . /app/
EXPOSE 8000
CMD ["/bin/bash", "-c", "source /opt/conda/etc/profile.d/conda.sh && conda activate jupyterlab_env && exec jupyterhub -f /etc/jupyterhub/jupyterhub_config.py"]