Upload Dockerfile
Browse files- Dockerfile +4 -1
Dockerfile
CHANGED
@@ -11,8 +11,10 @@ RUN apt-get update && apt-get install -y \
|
|
11 |
git \
|
12 |
&& rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
-
# 克隆 MinerU
|
15 |
RUN git clone https://github.com/opendatalab/MinerU.git /tmp/MinerU \
|
|
|
|
|
16 |
&& cp -r /tmp/MinerU/magic_pdf /app/magic_pdf \
|
17 |
&& rm -rf /tmp/MinerU
|
18 |
|
@@ -29,6 +31,7 @@ RUN python download_models.py
|
|
29 |
|
30 |
# 设置环境变量
|
31 |
ENV PORT=7860
|
|
|
32 |
|
33 |
# 启动应用
|
34 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]
|
|
|
11 |
git \
|
12 |
&& rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
+
# 克隆 MinerU 项目并安装
|
15 |
RUN git clone https://github.com/opendatalab/MinerU.git /tmp/MinerU \
|
16 |
+
&& cd /tmp/MinerU \
|
17 |
+
&& pip install -e . \
|
18 |
&& cp -r /tmp/MinerU/magic_pdf /app/magic_pdf \
|
19 |
&& rm -rf /tmp/MinerU
|
20 |
|
|
|
31 |
|
32 |
# 设置环境变量
|
33 |
ENV PORT=7860
|
34 |
+
ENV PYTHONPATH=/app:$PYTHONPATH
|
35 |
|
36 |
# 启动应用
|
37 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]
|