-
Notifications
You must be signed in to change notification settings - Fork 570
/
Copy pathDockerfile
36 lines (28 loc) · 1.17 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
#---
# name: jupyterlab
# group: ml
# depends: [cuda, cudnn, tensorrt, cuda-python, pycuda, rust]
# docs: docs.md
# notes: will autostart Jupyter server on port 8888 unless container entry CMD is overridden
#---
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
# set a specific version to install like '==4.2.0'
# (or by default leaving it blank will install the latest)
ARG JUPYTERLAB_VERSION_SPEC=""
# https://stackoverflow.com/questions/61553491/how-to-make-jupyter-terminal-fully-functional
ENV SHELL /bin/bash
SHELL ["/bin/bash", "-c"]
# enable colors in the jupyterlab terminal
RUN sed -i 's/^#force_color_prompt=yes/force_color_prompt=yes/' /root/.bashrc
# jupyterlab<4 -- ModuleNotFoundError: No module named 'notebook.auth'
RUN pip3 install jupyter "jupyterlab${JUPYTERLAB_VERSION_SPEC}" && \
pip3 install jupyterlab_widgets
RUN pip3 list
RUN jupyter --version
RUN jupyter labextension list
RUN jupyter lab --version && jupyter lab --generate-config
# RUN python3 -c "from notebook.auth.security import set_password; set_password('nvidia', '/root/.jupyter/jupyter_notebook_config.json')"
COPY jupyter_server_config.json /root/.jupyter/
COPY start_jupyter /
CMD /start_jupyter && /bin/bash