Commit f2ff3472 authored by myhloli's avatar myhloli
Browse files

fix: update Dockerfile to use sglang base image and adjust mineru installation

parent 1fa55b76
# Use the official Ubuntu base image # Use the official sglang image
FROM ubuntu:22.04 FROM lmsysorg/sglang:v0.4.7-cu124
# Set environment variables to non-interactive to avoid prompts during installation
ENV DEBIAN_FRONTEND=noninteractive
# Update the package list and install necessary packages
RUN apt-get update && \
apt-get install -y \
software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y \
python3.10 \
python3.10-venv \
python3.10-distutils \
python3-pip \
wget \
git \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Set Python 3.10 as the default python3
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
# install mineru latest # install mineru latest
RUN /bin/bash -c "pip3 install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple && \ RUN python3 -m pip install 'mineru[core]>=2.0.0' -i https://mirrors.aliyun.com/pypi/simple --break-system-packages
pip3 install uv -i https://mirrors.aliyun.com/pypi/simple && \
uv pip install 'mineru[all]>=2.0.0' -i https://mirrors.aliyun.com/pypi/simple"
# Download models and update the configuration file # Download models and update the configuration file
RUN /bin/bash -c "mineru-models-download -s modelscope -m all" RUN /bin/bash -c "mineru-models-download -s modelscope -m all"
......
# Use the official Ubuntu base image # Use the official sglang image
FROM ubuntu:22.04 FROM lmsysorg/sglang:v0.4.7-cu124
# Set environment variables to non-interactive to avoid prompts during installation
ENV DEBIAN_FRONTEND=noninteractive
# Update the package list and install necessary packages
RUN apt-get update && \
apt-get install -y \
software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y \
python3.10 \
python3.10-venv \
python3.10-distutils \
python3-pip \
wget \
git \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Set Python 3.10 as the default python3
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
# install mineru latest # install mineru latest
RUN /bin/bash -c "pip3 install --upgrade pip && \ RUN python3 -m pip install 'mineru[core]>=2.0.0' --break-system-packages
pip3 install uv && \
uv pip install 'mineru[all]>=2.0.0'"
# Download models and update the configuration file # Download models and update the configuration file
RUN /bin/bash -c "mineru-models-download -s huggingface -m all" RUN /bin/bash -c "mineru-models-download -s huggingface -m all"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment