Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Docker Image for PolarSeg #31

Open
FrancescoMandru opened this issue Mar 10, 2021 · 0 comments
Open

Build Docker Image for PolarSeg #31

FrancescoMandru opened this issue Mar 10, 2021 · 0 comments

Comments

@FrancescoMandru
Copy link

FrancescoMandru commented Mar 10, 2021

I'm trying to build a DockerFile to run this pre-trained network on OSX, however I encountered some problems intstalling torch_scatter and the problems seems to come from the Python Version. Can someone help me building the DockerFile correctly?

ARG cuda_version=9.0
ARG cudnn_version=7
#FROM nvidia/cuda:${cuda_version}-cudnn${cudnn_version}-devel
FROM nvidia/cuda:9.0-devel-ubuntu16.04
# Pin CuDNN 
RUN apt-get update && apt-get install -y --allow-downgrades --no-install-recommends \ 
    libcudnn7=7.0.5.15-1+cuda9.0 \
    libcudnn7-dev=7.0.5.15-1+cuda9.0
RUN apt-mark hold libcudnn7 libcudnn7-dev

# Supress warnings about missing front-end. As recommended at:
# http://stackoverflow.com/questions/22466255/is-it-possibe-to-answer-dialog-questions-when-installing-under-docker
ARG DEBIAN_FRONTEND=noninteractive

# Install system packages
RUN apt-get update && apt-get install -y --no-install-recommends \
      bzip2 \
      g++ \
      git \
      graphviz \
      libgl1-mesa-glx \
      libhdf5-dev \
      openmpi-bin \
      wget \
      curl \
      python3 \
      python3-pip \
      python3-venv \
      python3-dev \
      python3-setuptools \
      python3-tk



RUN apt-get update && apt-get install -y --no-install-recommends \
    apt-utils git curl vim unzip openssh-client wget \
    build-essential cmake \
    libopenblas-dev

RUN apt-get install -y --no-install-recommends \
    libjpeg8-dev libtiff5-dev libjasper-dev libpng12-dev \
    libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libgtk2.0-dev \
    liblapacke-dev checkinstall

# Install Python packages and keras
ENV NB_USER app
ENV NB_UID 1000

RUN useradd -m -s /bin/bash -N -u $NB_UID $NB_USER && \
    mkdir -p /src && \
    mkdir -p /workspace && \
    chown $NB_USER /src && \
    chown $NB_USER /workspace

RUN rm -rf /var/lib/apt/lists/*

USER $NB_USER

WORKDIR /workspace

RUN pip3 install --upgrade "pip==20.3"

RUN pip3 install torch==1.5.0

RUN pip3 install \
    numpy \
    tqdm \
    pyyaml \
    Cython \
    scipy \
    dropblock \ 
    plyfile \
    llvmlite==0.31.0 \
    numba>=0.39.0 
    
    
#RUN pip3 install torch_scatter>=1.3.0

ENV PATH "/home/app/.local/bin:$PATH"
CMD jupyter notebook --port=8888 --ip=0.0.0.0

ERROR:

> [13/13] RUN pip3 install torch_scatter>=1.3.0:                                                                                                                                    
#16 0.955 WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.                                                                         
#16 0.955 Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.                                                                              
#16 0.955 To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.                                                                                 
#16 0.955 DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
#16 1.552     ERROR: Command errored out with exit status 1:
#16 1.552      command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qebgirgt/torch-scatter_f7452704942b4c9589c7aac19760b7c1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qebgirgt/torch-scatter_f7452704942b4c9589c7aac19760b7c1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-b3adgb6a
#16 1.552          cwd: /tmp/pip-install-qebgirgt/torch-scatter_f7452704942b4c9589c7aac19760b7c1/
#16 1.552     Complete output (6 lines):
#16 1.552     Traceback (most recent call last):
#16 1.552       File "<string>", line 1, in <module>
#16 1.552       File "/tmp/pip-install-qebgirgt/torch-scatter_f7452704942b4c9589c7aac19760b7c1/setup.py", line 47
#16 1.552         sources = [main, osp.join(extensions_dir, 'cpu', f'{name}_cpu.cpp')]
#16 1.552                                                                          ^
#16 1.552     SyntaxError: invalid syntax
#16 1.552     ----------------------------------------
#16 1.553 ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
#16 1.573 WARNING: You are using pip version 20.3; however, version 20.3.4 is available.
#16 1.573 You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
------
executor failed running [/bin/sh -c pip3 install torch_scatter>=1.3.0]: exit code: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant