# 使用 Python 3.8 官方镜像
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.8-slim

# 设置工作目录
WORKDIR /app

# # 先更新软件包列表，再安装 antiword
RUN apt-get update && \
    apt-get install -y --no-install-recommends vim sox libsox-dev && \
    rm -rf /var/lib/apt/lists/*

# 复制依赖文件并安装Python包
COPY ./requirements.txt .
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  --no-cache-dir -r requirements.txt 

# 复制应用代码
COPY ./src .

# # 启动命令
CMD ["uvicorn","app:app", "--host", "0.0.0.0", "--port", "8000"]