mirror of
https://github.com/qurator-spk/ocrd-galley.git
synced 2025-06-09 22:59:53 +02:00
🚧 Install pyenv in CUDA image, too
This commit is contained in:
parent
c8de7b6769
commit
429d831526
1 changed files with 28 additions and 12 deletions
|
@ -9,10 +9,10 @@ ENV PIP_DEFAULT_TIMEOUT=120
|
||||||
RUN echo "APT::Acquire::Retries \"3\";" > /etc/apt/apt.conf.d/80-retries && \
|
RUN echo "APT::Acquire::Retries \"3\";" > /etc/apt/apt.conf.d/80-retries && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
curl xz-utils \
|
build-essential \
|
||||||
build-essential python3-dev \
|
curl \
|
||||||
# For get-pip.py:
|
git \
|
||||||
python3-distutils \
|
xz-utils \
|
||||||
# For add-apt-repository:
|
# For add-apt-repository:
|
||||||
software-properties-common \
|
software-properties-common \
|
||||||
# XML utils
|
# XML utils
|
||||||
|
@ -20,6 +20,17 @@ RUN echo "APT::Acquire::Retries \"3\";" > /etc/apt/apt.conf.d/80-retries && \
|
||||||
xmlstarlet \
|
xmlstarlet \
|
||||||
# OCR-D uses ImageMagick for pixel density estimation
|
# OCR-D uses ImageMagick for pixel density estimation
|
||||||
imagemagick \
|
imagemagick \
|
||||||
|
# pyenv builds
|
||||||
|
# TODO: builder container?
|
||||||
|
libz-dev \
|
||||||
|
libssl-dev \
|
||||||
|
libbz2-dev \
|
||||||
|
liblzma-dev \
|
||||||
|
libncurses-dev \
|
||||||
|
libffi-dev \
|
||||||
|
libreadline-dev \
|
||||||
|
libsqlite3-dev \
|
||||||
|
libmagic-dev \
|
||||||
&& \
|
&& \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
@ -29,14 +40,19 @@ RUN echo "APT::Acquire::Retries \"3\";" > /etc/apt/apt.conf.d/80-retries && \
|
||||||
RUN echo "setOverrideLogLevel(os.getenv('LOG_LEVEL', 'INFO'))" >/etc/ocrd_logging.py
|
RUN echo "setOverrideLogLevel(os.getenv('LOG_LEVEL', 'INFO'))" >/etc/ocrd_logging.py
|
||||||
|
|
||||||
|
|
||||||
# Install pip (and setuptools)
|
# Install pyenv
|
||||||
# We use get-pip.py here to avoid
|
# TODO: do not run as root
|
||||||
# a. having to upgrade from Ubuntu's pip
|
# TODO: does just saying "3.7" work as intended?
|
||||||
# b. the dreaded "old script wrapper" error message
|
ENV HOME=/root
|
||||||
RUN curl -sSL https://bootstrap.pypa.io/pip/3.6/get-pip.py -o get-pip.py && \
|
ENV PYENV_ROOT=/usr/local/share/pyenv
|
||||||
python3 get-pip.py && \
|
ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
|
||||||
rm -f get-pip.py
|
RUN \
|
||||||
|
git clone --depth=1 https://github.com/yyuu/pyenv.git $PYENV_ROOT && \
|
||||||
|
pyenv install 3.7 && \
|
||||||
|
pyenv global 3.7 && \
|
||||||
|
pyenv rehash && \
|
||||||
|
pip install -U pip wheel && \
|
||||||
|
pip install setuptools
|
||||||
|
|
||||||
# Install pip installable-stuff
|
# Install pip installable-stuff
|
||||||
RUN ${PIP_INSTALL} \
|
RUN ${PIP_INSTALL} \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue