1 Star 0 Fork 0

lijwchn/PaddleOCRFastAPI

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
lijwchn 提交于 2024-07-20 23:25 . first
FROM python:3.8-slim-bullseye
# 设置当前目录为工作目录
WORKDIR /app
# Copy only the necessary files for pip install
COPY requirements.txt /app
# apt-get换源并安装依赖
RUN sed -i "s@http://deb.debian.org@http://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list
RUN cat /etc/apt/sources.list
RUN apt-get update && apt-get install -y libgl1 libgomp1 libglib2.0-0 libsm6 libxrender1 libxext6
# 清理apt-get缓存
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# pip换源并安装python依赖
RUN python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip
# RUN pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# RUN pip3 config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple
# RUN pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/
RUN pip3 install -r requirements.txt -i https://mirrors.cloud.tencent.com/pypi/simple
# Copy the rest
COPY . /app
# CMD ["python3", "./main.py"]
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8001"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lijwchn/paddle-ocrfast-api.git
git@gitee.com:lijwchn/paddle-ocrfast-api.git
lijwchn
paddle-ocrfast-api
PaddleOCRFastAPI
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385