mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-08-05 16:48:53 +00:00
Update Dockerfile
Dockerfile completo e atualizado com suporte ao pacote av (PyAV), que requer bibliotecas do sistema adicionais como libavcodec-dev, libavformat-dev e libswscale-dev:
This commit is contained in:
parent
a3b800e556
commit
4d99292b25
1 changed files with 9 additions and 1 deletions
10
Dockerfile
10
Dockerfile
|
@ -1,18 +1,26 @@
|
||||||
FROM python:3.10-slim
|
FROM python:3.10-slim
|
||||||
|
|
||||||
# Instala libs de sistema necessárias para soundfile e pydub
|
# Instala libs de sistema necessárias para soundfile, pydub e av (PyAV)
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
libsndfile1 \
|
libsndfile1 \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
|
libavcodec-dev \
|
||||||
|
libavformat-dev \
|
||||||
|
libswscale-dev \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Define o diretório de trabalho no container
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copia e instala as dependências do projeto
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# Copia o restante da aplicação
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Expõe a porta da aplicação
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
|
# Comando de execução padrão
|
||||||
CMD ["uvicorn", "api.src.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
CMD ["uvicorn", "api.src.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||||
|
|
Loading…
Add table
Reference in a new issue