mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-08-05 16:48:53 +00:00
Update Dockerfile
This commit is contained in:
parent
453a76754d
commit
739a0a71f7
1 changed files with 22 additions and 21 deletions
17
Dockerfile
17
Dockerfile
|
@ -1,10 +1,7 @@
|
|||
FROM python:3.10-slim
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Corrige problemas de DNS, repositórios e dependências do sistema
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
# Instala dependências de sistema para libs Python (soundfile, pydub, av, etc)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ffmpeg \
|
||||
libavformat-dev \
|
||||
|
@ -18,17 +15,21 @@ RUN apt-get update && \
|
|||
git \
|
||||
ca-certificates \
|
||||
pkg-config \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Cria o diretório de trabalho
|
||||
WORKDIR /app
|
||||
|
||||
# Copia o requirements e instala dependências Python
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
RUN pip install --upgrade pip && \
|
||||
pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copia o restante da aplicação
|
||||
COPY . .
|
||||
|
||||
# Expõe a porta da aplicação
|
||||
EXPOSE 8000
|
||||
|
||||
# Comando para iniciar a aplicação
|
||||
CMD ["uvicorn", "api.src.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
|
|
Loading…
Add table
Reference in a new issue