mirror of
https://github.com/allenai/olmocr.git
synced 2025-06-27 04:00:02 +00:00
fixing packages of 22.04
This commit is contained in:
parent
c5d075c63a
commit
c8a5361d1b
21
Dockerfile
21
Dockerfile
@ -16,25 +16,26 @@ add-apt-repository -y ppa:deadsnakes/ppa && break || \
|
|||||||
{ echo "Attempt $i failed, retrying in 5s..."; sleep 5; }; \
|
{ echo "Attempt $i failed, retrying in 5s..."; sleep 5; }; \
|
||||||
done \
|
done \
|
||||||
&& apt-get update -y \
|
&& apt-get update -y \
|
||||||
&& apt-get install -y python${PYTHON_VERSION} python${PYTHON_VERSION}-dev python${PYTHON_VERSION}-venv \
|
&& apt-get install -y python${PYTHON_VERSION} python${PYTHON_VERSION}-dev python${PYTHON_VERSION}-venv
|
||||||
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 \
|
|
||||||
|
# olmOCR Specific Installs - Install fonts BEFORE changing Python version
|
||||||
|
RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections && \
|
||||||
|
apt-get update -y && \
|
||||||
|
apt-get install -y --no-install-recommends poppler-utils fonts-crosextra-caladea fonts-crosextra-carlito gsfonts lcdf-typetools ttf-mscorefonts-installer
|
||||||
|
|
||||||
|
# Now update Python alternatives
|
||||||
|
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 \
|
||||||
&& update-alternatives --set python3 /usr/bin/python${PYTHON_VERSION} \
|
&& update-alternatives --set python3 /usr/bin/python${PYTHON_VERSION} \
|
||||||
&& update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_VERSION} 1 \
|
&& update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_VERSION} 1 \
|
||||||
&& update-alternatives --set python /usr/bin/python${PYTHON_VERSION} \
|
&& update-alternatives --set python /usr/bin/python${PYTHON_VERSION} \
|
||||||
&& ln -sf /usr/bin/python${PYTHON_VERSION}-config /usr/bin/python3-config \
|
&& ln -sf /usr/bin/python${PYTHON_VERSION}-config /usr/bin/python3-config \
|
||||||
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} \
|
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} \
|
||||||
&& python3 --version && python3 -m pip --version
|
&& python3 --version && python3 -m pip --version
|
||||||
|
|
||||||
# Install uv for faster pip installs
|
# Install uv for faster pip installs
|
||||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||||
python3 -m pip install uv
|
python3 -m pip install uv
|
||||||
# olmOCR Specific Installs
|
|
||||||
# Install fonts with fix for Python apt module
|
|
||||||
RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections && \
|
|
||||||
apt-get update -y && \
|
|
||||||
# First install python3-apt for the system Python (3.10) that update-notifier-common needs
|
|
||||||
apt-get install -y python3-apt && \
|
|
||||||
# Now install the fonts and other packages
|
|
||||||
apt-get install -y --no-install-recommends poppler-utils fonts-crosextra-caladea fonts-crosextra-carlito gsfonts lcdf-typetools ttf-mscorefonts-installer
|
|
||||||
# Install some helper utilities for things like the benchmark
|
# Install some helper utilities for things like the benchmark
|
||||||
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
||||||
git \
|
git \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user