Merge pull request #1485 from mathbunnyru/asalikhov/fix_tensorflow

Fix tensorflow keras bug
This commit is contained in:
Ayaz Salikhov
2021-10-16 22:10:01 +03:00
committed by GitHub
3 changed files with 12 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ repos:
rev: v2.7.0
hooks:
- id: hadolint-docker
entry: hadolint/hadolint:v2.7.0 hadolint
# Lint: YAML
- repo: https://github.com/adrienverge/yamllint.git

View File

@@ -46,6 +46,7 @@ RUN mamba install --quiet --yes \
fix-permissions "/home/${NB_USER}"
# These packages are not easy to install under arm
# hadolint ignore=SC2039
RUN set -x && \
arch=$(uname -m) && \
if [ "${arch}" == "x86_64" ]; then \

View File

@@ -6,9 +6,19 @@ FROM $BASE_CONTAINER
LABEL maintainer="Jupyter Project <jupyter@googlegroups.com>"
# Fix DL4006
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install Tensorflow
RUN mamba install --quiet --yes \
'tensorflow' && \
mamba clean --all -f -y && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
# Temporary fix for https://github.com/jupyter/docker-stacks/issues/1480
USER root
WORKDIR /opt/conda/lib/python3.9/site-packages/
RUN wget -qO- https://patch-diff.githubusercontent.com/raw/tensorflow/tensorflow/pull/51450.diff | git apply
USER ${NB_UID}
WORKDIR "${HOME}"