Create Dockerfile
Browse files- Dockerfile +35 -0
Dockerfile
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
# Example of installing system packages using apt-get
|
| 10 |
+
# Uncomment the following line to install packages like 'nano' or 'tree'
|
| 11 |
+
# RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 12 |
+
# nano \
|
| 13 |
+
# tree \
|
| 14 |
+
# && rm -rf /var/lib/apt/lists/*
|
| 15 |
+
|
| 16 |
+
# Switch back to the default jovyan user
|
| 17 |
+
# This is a security best practice to avoid running as root
|
| 18 |
+
USER ${NB_USER}
|
| 19 |
+
|
| 20 |
+
# Install additional Python packages using pip
|
| 21 |
+
# You can add your project-specific libraries here
|
| 22 |
+
RUN pip install --no-cache-dir \
|
| 23 |
+
scikit-learn \
|
| 24 |
+
seaborn \
|
| 25 |
+
tensorflow
|
| 26 |
+
|
| 27 |
+
# You can also use a requirements.txt file for a cleaner setup
|
| 28 |
+
# COPY --chown=${NB_UID}:${NB_GID} requirements.txt /tmp/
|
| 29 |
+
# RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
| 30 |
+
|
| 31 |
+
# Expose the JupyterLab port
|
| 32 |
+
EXPOSE 8888
|
| 33 |
+
|
| 34 |
+
# The default command is already set in the base image to start JupyterLab.
|
| 35 |
+
# No need to specify CMD or ENTRYPOINT unless you want to override the default behavior.
|