Spaces:
Running
Running
Download Dockerfile from data-learner/pharmacy: direct link, hf CLI and curl.
- Browser
- Download file 721 Bytes
-
https://huggingface.co/spaces/data-learner/pharmacy/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/data-learner/pharmacy/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/data-learner/pharmacy/resolve/main/Dockerfile
721 Bytes
| FROM python:3.10-slim | |
| # 安装 Tesseract OCR + 中文语言包 + Pillow 所需的系统库 | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| tesseract-ocr \ | |
| tesseract-ocr-chi-sim \ | |
| libjpeg62-turbo \ | |
| zlib1g \ | |
| libfreetype6 \ | |
| liblcms2-2 \ | |
| libwebp7 \ | |
| && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # 设置工作目录 | |
| WORKDIR /app | |
| # 复制依赖文件并安装 | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 复制应用代码 | |
| COPY unified_server.py . | |
| COPY export_server.py . | |
| COPY test-h5.html . | |
| # 暴露端口(Hugging Face Spaces 默认 7860) | |
| EXPOSE 7860 | |
| # 启动服务 | |
| CMD ["python", "unified_server.py"] | |