Files
SkyLi 356a308f9b Initial commit: Infrared Equipment Fault Detection HTTP Service
- Add FastAPI microservice for infrared equipment fault detection
- Add dual pyproject.toml: local development and Docker deployment
- Add MANUAL_SETUP.md for manual file placement instructions
- Add Dockerfile for containerized deployment
- Add sample .env.example for PROJECT_ROOT configuration
- Configure gitignore for weights, lib, venv, and environment files
2026-03-28 20:28:32 +08:00

26 lines
521 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM python:3.10-slim
WORKDIR /app
# 安装 uv
RUN pip install uv
# 复制本地 whl 文件(预下载)
COPY lib/ /app/lib/
# 复制依赖配置(Docker 专用)
COPY pyproject.docker.toml /app/pyproject.toml
# 安装依赖(包括 infrared-data 从本地 whl)
RUN uv pip install --system -r /app/pyproject.toml
# 复制源码
COPY src/ ./src/
# 复制预下载的权重文件
COPY weights/ /app/weights/
EXPOSE 8000
CMD ["python", "-m", "uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000"]