kor / Dockerfile
yzwwxm's picture
Update Dockerfile
586565d verified
raw
history blame contribute delete
721 Bytes
# 使用官方的Python镜像作为基础镜像
FROM python:3.9-slim
# 设置工作目录
WORKDIR /app
# 安装系统依赖
RUN apt-get update && \
apt-get -qq -y install espeak-ng ffmpeg libavcodec-extra git > /dev/null 2>&1 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# 克隆 GitHub 仓库
RUN git clone https://github.com/jianchang512/kokoro-uiapi /app/kokoro-uiapi
# 切换到克隆的目录
WORKDIR /app/kokoro-uiapi
RUN chmod -R 777 /app/kokoro-uiapi
# 安装 Python 依赖
RUN pip install --no-cache-dir -r requirements.txt
# 替换 app.py 中的 /v1 为 /api
RUN sed -i 's|/v1|/api|g' app.py
# 暴露端口(如果需要)
EXPOSE 5066
# 启动应用程序
CMD ["python", "app.py"]