Я создаю контейнер Docker для запуска примера кода в «Deep Learning with Python» Франсуа Шолле и продолжаю получать ошибку подтверждения при использовании docker-compose up
в Ubuntu 18.04.
Я пытался обновить PIP, Python и Docker-Compose
FROM nvidia/cuda:9.0-base-ubuntu16.04
# Pick up some TF dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cuda-command-line-tools-9-0 \
cuda-cublas-9-0 \
cuda-cufft-9-0 \
cuda-curand-9-0 \
cuda-cusolver-9-0 \
cuda-cusparse-9-0 \
libcudnn7=7.2.1.38-1+cuda9.0 \
libnccl2=2.2.13-1+cuda9.0 \
libfreetype6-dev \
libhdf5-serial-dev \
libpng12-dev \
libzmq3-dev \
pkg-config \
software-properties-common \
unzip \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install nvinfer-runtime-trt-repo-ubuntu1604-4.0.1-ga-cuda9.0 && \
apt-get update && \
apt-get install libnvinfer4=4.1.2-1+cuda9.0
ARG USE_PYTHON_3_NOT_2
ARG _PY_SUFFIX=${USE_PYTHON_3_NOT_2:+3}
ARG PYTHON=python${_PY_SUFFIX}
ARG PIP=pip${_PY_SUFFIX}
RUN echo "python version: $PYTHON"
RUN apt-get update && apt-get install -y \
${PYTHON} \
${PYTHON}-pip
RUN ${PIP} install --upgrade \
pip \
setuptools
ARG TF_PACKAGE=tensorflow-gpu
RUN ${PIP} install ${TF_PACKAGE}
# COPY bashrc /etc/bash.bashrc
# RUN chmod a+rwx /etc/bash.bashrc
RUN ${PIP} install jupyter
RUN mkdir /notebooks && chmod a+rwx /notebooks
RUN mkdir /.local && chmod a+rwx /.local
WORKDIR /notebooks
EXPOSE 8888
RUN mkdir -p /home/ubuntu/data
COPY requirements.txt ./
RUN ${PIP} install --no-cache-dir -r requirements.txt
CMD ["bash", "-c", "source /etc/bash.bashrc && jupyter notebook --notebook-dir=/notebooks --ip 0.0.0.0 --no-browser --allow-root"]
Я ожидаю, что это откроет Docker Container с Jupyter Notebook, который я могу открыть в приложении веб-браузера, но я получаю ошибку:
Step 20/21 : RUN ${PIP} install --no-cache-dir -r requirements.txt
---> Running in c9c41fa7e5c3
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting Pillow (from -r requirements.txt (line 1))
Downloading
Collecting keras (from -r requirements.txt (line 2))
Downloading
Collecting matplotlib (from -r requirements.txt (line 3))
Downloading
Collecting scikit-learn (from -r requirements.txt (line 4))
Downloading
Collecting scipy>=0.14 (from keras->-r requirements.txt (line 2))
Downloading
Requirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/lib/python2.7/dist-packages (from keras->-r requirements.txt (line 2)) (1.0.5)
Requirement already satisfied: numpy>=1.9.1 in /usr/local/lib/python2.7/dist-packages (from keras->-r requirements.txt (line 2)) (1.16.0)
Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python2.7/dist-packages (from keras->-r requirements.txt (line 2)) (1.12.0)
Collecting pyyaml (from keras->-r requirements.txt (line 2))
Downloading
Requirement already satisfied: h5py in /usr/local/lib/python2.7/dist-packages (from keras->-r requirements.txt (line 2)) (2.9.0)
Requirement already satisfied: keras-applications>=1.0.6 in /usr/local/lib/python2.7/dist-packages (from keras->-r requirements.txt (line 2)) (1.0.6)
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 (from matplotlib->-r requirements.txt (line 3))
Downloading
Collecting backports.functools-lru-cache (from matplotlib->-r requirements.txt (line 3))
Downloading
Collecting subprocess32 (from matplotlib->-r requirements.txt (line 3))
Downloading
Collecting pytz (from matplotlib->-r requirements.txt (line 3))
Downloading
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python2.7/dist-packages (from matplotlib->-r requirements.txt (line 3)) (2.7.5)
Collecting kiwisolver>=1.0.1 (from matplotlib->-r requirements.txt (line 3))
Downloading
Collecting cycler>=0.10 (from matplotlib->-r requirements.txt (line 3))
Downloading
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from kiwisolver>=1.0.1->matplotlib->-r requirements.txt (line 3)) (40.6.3)
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/cli/base_command.py", line 176, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/commands/install.py", line 346, in run
session=session, autobuilding=True
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/wheel.py", line 848, in build
assert building_is_possible
AssertionError
You are using pip version 19.0, however version 19.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
ERROR: Service 'deep-learning-with-python_service' failed to build: The command '/bin/sh -c ${PIP} install --no-cache-dir -r requirements.txt' returned a non-zero code: 2