Move recipe Dockerfiles to separate files (#1953)

This commit is contained in:
Ayaz Salikhov
2023-07-28 18:23:39 +04:00
committed by GitHub
parent bc938c50dc
commit 5e381019fd
13 changed files with 128 additions and 100 deletions

View File

@@ -0,0 +1,10 @@
FROM jupyter/base-notebook
# Install the Dask dashboard
RUN mamba install --yes 'dask-labextension' && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
# Dask Scheduler port
EXPOSE 8787

View File

@@ -0,0 +1,6 @@
FROM jupyter/base-notebook
RUN mamba install --yes 'jupyterhub==4.0.1' && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

View File

@@ -0,0 +1,13 @@
FROM jupyter/base-notebook
RUN mamba install --yes 'flake8' && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
# Install from the requirements.txt file
COPY --chown=${NB_UID}:${NB_GID} requirements.txt /tmp/
RUN mamba install --yes --file /tmp/requirements.txt && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

View File

@@ -0,0 +1,16 @@
FROM jupyter/base-notebook
# Fix: https://github.com/hadolint/hadolint/wiki/DL4006
# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
USER root
# `/etc/dpkg/dpkg.cfg.d/excludes` contains several `path-exclude`s, including man pages
# Remove it, then install man, install docs
RUN rm /etc/dpkg/dpkg.cfg.d/excludes && \
apt-get update --yes && \
dpkg -l | grep ^ii | cut -d' ' -f3 | xargs apt-get install --yes --no-install-recommends --reinstall man && \
apt-get clean && rm -rf /var/lib/apt/lists/*
USER ${NB_UID}

View File

@@ -0,0 +1,30 @@
FROM jupyter/base-notebook
# Fix: https://github.com/hadolint/hadolint/wiki/DL4006
# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
USER root
ENV MSSQL_DRIVER "ODBC Driver 18 for SQL Server"
ENV PATH="/opt/mssql-tools18/bin:${PATH}"
RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends curl gnupg2 lsb-release && \
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list" > /etc/apt/sources.list.d/mssql-release.list && \
apt-get update --yes && \
ACCEPT_EULA=Y apt-get install --yes --no-install-recommends msodbcsql18 && \
# optional: for bcp and sqlcmd
ACCEPT_EULA=Y apt-get install --yes --no-install-recommends mssql-tools18 && \
# optional: for unixODBC development headers
apt-get install --yes --no-install-recommends unixodbc-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Switch back to jovyan to avoid accidental container runs as root
USER ${NB_UID}
RUN mamba install --yes 'pyodbc' && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

View File

@@ -0,0 +1,12 @@
FROM jupyter/base-notebook
# Install in the default python3 environment
RUN pip install --no-cache-dir 'flake8' && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
# Install from the requirements.txt file
COPY --chown=${NB_UID}:${NB_GID} requirements.txt /tmp/
RUN pip install --no-cache-dir --requirement /tmp/requirements.txt && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

View File

@@ -0,0 +1,6 @@
FROM jupyter/base-notebook
RUN mamba install --yes 'jupyterlab_rise' && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

View File

@@ -0,0 +1,6 @@
FROM jupyter/base-notebook
RUN mamba install --yes 'py-xgboost' && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"