Dockerfile 785 Bytes
Newer Older
1
# Use the official sglang image
2
FROM lmsysorg/sglang:v0.4.8.post1-cu126
Aoyang Fang's avatar
Aoyang Fang committed
3

4
# Install libgl for opencv support & Noto fonts for Chinese characters
5
RUN apt-get update && \
6
    apt-get install -y \
7
8
9
10
        fonts-noto-core \
        fonts-noto-cjk \
        fontconfig \
        libgl1 && \
11
    fc-cache -fv && \
12
    apt-get clean && \
13
    rm -rf /var/lib/apt/lists/*
14
15

# Install mineru latest
16
17
RUN python3 -m pip install -U 'mineru[core]' --break-system-packages && \
    python3 -m pip cache purge
18
19

# Download models and update the configuration file
20
RUN /bin/bash -c "mineru-models-download -s huggingface -m all"
Aoyang Fang's avatar
Aoyang Fang committed
21
22

# Set the entry point to activate the virtual environment and run the command line tool
23
ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]