Merge branch 'master' into asalikhov/hadolint_pre_commit

This commit is contained in:
Ayaz Salikhov
2021-05-06 08:38:35 +03:00
6 changed files with 32 additions and 16 deletions

View File

@@ -44,17 +44,16 @@ ARG miniforge_checksum="c56cc2da96043688c6bdb521d825de27754de0a342d5228ba3155cd9
# Install all OS dependencies for notebook server that starts but lacks all
# features (e.g., download as all possible file formats)
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -q update \
&& apt-get install -yq --no-install-recommends \
RUN apt-get -q update && \
apt-get install -yq --no-install-recommends \
wget \
ca-certificates \
sudo \
locales \
fonts-liberation \
run-one \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
run-one && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen
# Configure environment
@@ -159,9 +158,8 @@ USER root
# Prepare upgrade to JupyterLab V3.0 #1205
RUN sed -re "s/c.NotebookApp/c.ServerApp/g" \
/etc/jupyter/jupyter_notebook_config.py > /etc/jupyter/jupyter_server_config.py
RUN fix-permissions /etc/jupyter/
/etc/jupyter/jupyter_notebook_config.py > /etc/jupyter/jupyter_server_config.py && \
fix-permissions /etc/jupyter/
# Switch back to jovyan to avoid accidental container runs as root
USER $NB_UID

View File

@@ -0,0 +1,19 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import logging
from packaging import version
LOGGER = logging.getLogger(__name__)
def test_python_version(container, python_next_version="3.9"):
"""Check that python version is lower than the next version"""
LOGGER.info(f"Checking that python version is lower than {python_next_version}")
c = container.run(tty=True, command=["start.sh"])
cmd = c.exec_run("python --version")
output = cmd.output.decode("utf-8")
actual_python_version = version.parse(output.split()[1])
assert actual_python_version < version.parse(
python_next_version
), f"Python version shall be lower than {python_next_version}"

View File

@@ -39,8 +39,8 @@ RUN mkdir "/opt/julia-${JULIA_VERSION}" && \
wget -q https://julialang-s3.julialang.org/bin/linux/x64/$(echo "${JULIA_VERSION}" | cut -d. -f 1,2)"/julia-${JULIA_VERSION}-linux-x86_64.tar.gz" && \
echo "${julia_checksum} *julia-${JULIA_VERSION}-linux-x86_64.tar.gz" | sha256sum -c - && \
tar xzf "julia-${JULIA_VERSION}-linux-x86_64.tar.gz" -C "/opt/julia-${JULIA_VERSION}" --strip-components=1 && \
rm "/tmp/julia-${JULIA_VERSION}-linux-x86_64.tar.gz"
RUN ln -fs /opt/julia-*/bin/julia /usr/local/bin/julia
rm "/tmp/julia-${JULIA_VERSION}-linux-x86_64.tar.gz" && \
ln -fs /opt/julia-*/bin/julia /usr/local/bin/julia
# Show Julia where conda libraries are \
RUN mkdir /etc/julia && \

View File

@@ -56,7 +56,7 @@ USER $NB_UID
# Install pyarrow
RUN conda install --quiet --yes --satisfied-skip-solve \
'pyarrow=3.0.*' && \
'pyarrow=4.0.*' && \
conda clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"

View File

@@ -24,7 +24,7 @@ RUN conda install --quiet --yes \
'cython=0.29.*' \
'dask=2021.4.*' \
'dill=0.3.*' \
'h5py=3.1.*' \
'h5py=3.2.*' \
'ipywidgets=7.6.*' \
'ipympl=0.7.*'\
'matplotlib-base=3.4.*' \
@@ -40,7 +40,7 @@ RUN conda install --quiet --yes \
'seaborn=0.11.*' \
'sqlalchemy=1.4.*' \
'statsmodels=0.12.*' \
'sympy=1.7.*' \
'sympy=1.8.*' \
'vincent=0.4.*' \
'widgetsnbextension=3.5.*'\
'xlrd=2.0.*' && \

View File

@@ -7,8 +7,7 @@ LABEL maintainer="Jupyter Project <jupyter@googlegroups.com>"
# Install Tensorflow
RUN mamba install --quiet --yes \
'tensorflow=2.4.1' \
&& \
'tensorflow=2.4.1' && \
conda clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"