Update Dockerfile
Browse files- Dockerfile +12 -27
Dockerfile
CHANGED
|
@@ -1,33 +1,18 @@
|
|
| 1 |
-
# Start from the official Jupyter Scipy Notebook image.
|
| 2 |
-
# This image includes Python and popular data science libraries.
|
| 3 |
-
# You can find more images here: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html
|
| 4 |
FROM jupyter/scipy-notebook:latest
|
| 5 |
-
|
| 6 |
-
# Switch to the root user to install system-level packages
|
| 7 |
USER root
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
#
|
| 14 |
-
# && rm -rf /var/lib/apt/lists/*
|
| 15 |
-
|
| 16 |
-
# Install additional Python packages using pip
|
| 17 |
-
# You can add your project-specific libraries here
|
| 18 |
RUN pip install --no-cache-dir \
|
| 19 |
scikit-learn \
|
| 20 |
seaborn \
|
| 21 |
tensorflow
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
#
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
# Expose the JupyterLab port
|
| 30 |
-
EXPOSE 8888
|
| 31 |
-
|
| 32 |
-
# The default command is already set in the base image to start JupyterLab.
|
| 33 |
-
# No need to specify CMD or ENTRYPOINT unless you want to override the default behavior.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM jupyter/scipy-notebook:latest
|
|
|
|
|
|
|
| 2 |
USER root
|
| 3 |
+
# Install system packages
|
| 4 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
+
nano \
|
| 6 |
+
sudo \
|
| 7 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
+
# Install Python packages
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
RUN pip install --no-cache-dir \
|
| 10 |
scikit-learn \
|
| 11 |
seaborn \
|
| 12 |
tensorflow
|
| 13 |
+
# Enable dark mode
|
| 14 |
+
RUN mkdir -p /opt/conda/share/jupyter/lab/settings
|
| 15 |
+
RUN echo '{ "@jupyterlab/apputils-extension:themes": { "theme": "JupyterLab Dark" } }' > /opt/conda/share/jupyter/lab/settings/overrides.json
|
| 16 |
+
# Override the default command to run as root with --allow-root
|
| 17 |
+
CMD ["start-notebook.sh", "--NotebookApp.allow_root=True"]
|
| 18 |
+
EXPOSE 8888
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|