moved file mod before the user change
Browse files- Dockerfile +6 -4
Dockerfile
CHANGED
|
@@ -1,6 +1,12 @@
|
|
| 1 |
# Base: official vLLM OpenAI-compatible server (tested version family)
|
| 2 |
FROM vllm/vllm-openai:v0.9.1
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# Set up a new user named "user" with user ID 1000
|
| 5 |
RUN useradd -m -u 1000 user
|
| 6 |
|
|
@@ -51,10 +57,6 @@ RUN HF_MODEL_PATH=$(cat /home/user/app/model_path.txt) && \
|
|
| 51 |
ENV HF_MODEL_PATH=/home/user/.cache/huggingface/hub/models--rednote-hilab--dots.ocr
|
| 52 |
ENV PYTHONPATH="/home/user/.cache/huggingface/hub/models--rednote-hilab--dots.ocr:${PYTHONPATH}"
|
| 53 |
|
| 54 |
-
# vLLM needs the custom model to be registered before main() runs.
|
| 55 |
-
# The model authors recommend importing their vLLM adapter into the vllm CLI module.
|
| 56 |
-
RUN sed -i '/^from vllm\.entrypoints\.cli\.main import main$/a\
|
| 57 |
-
from DotsOCR import modeling_dots_ocr_vllm' $(which vllm)
|
| 58 |
|
| 59 |
# Expose the Space port and launch the OpenAI-compatible server
|
| 60 |
EXPOSE 7860
|
|
|
|
| 1 |
# Base: official vLLM OpenAI-compatible server (tested version family)
|
| 2 |
FROM vllm/vllm-openai:v0.9.1
|
| 3 |
|
| 4 |
+
# vLLM needs the custom model to be registered before main() runs.
|
| 5 |
+
# The model authors recommend importing their vLLM adapter into the vllm CLI module.
|
| 6 |
+
# Do this as root before switching to user
|
| 7 |
+
RUN sed -i '/^from vllm\.entrypoints\.cli\.main import main$/a\
|
| 8 |
+
from DotsOCR import modeling_dots_ocr_vllm' $(which vllm)
|
| 9 |
+
|
| 10 |
# Set up a new user named "user" with user ID 1000
|
| 11 |
RUN useradd -m -u 1000 user
|
| 12 |
|
|
|
|
| 57 |
ENV HF_MODEL_PATH=/home/user/.cache/huggingface/hub/models--rednote-hilab--dots.ocr
|
| 58 |
ENV PYTHONPATH="/home/user/.cache/huggingface/hub/models--rednote-hilab--dots.ocr:${PYTHONPATH}"
|
| 59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
# Expose the Space port and launch the OpenAI-compatible server
|
| 62 |
EXPOSE 7860
|