Update Dockerfile

#2
by eder0782 - opened
Files changed (1) hide show
  1. Dockerfile +17 -2
Dockerfile CHANGED
@@ -1,8 +1,23 @@
1
- FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu20.04
2
- RUN apt-get update && apt-get install -y python3 python3-pip espeak-ng && rm -rf /var/lib/apt/lists/*
 
 
 
 
3
  WORKDIR /app
 
 
4
  COPY requirements.txt .
5
  COPY main.py .
 
 
6
  RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
7
  EXPOSE 7860
 
 
8
  CMD ["python3", "main.py"]
 
1
+ FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
2
+
3
+ # Instalar dependências do sistema
4
+ RUN apt-get update && apt-get install -y python3 python3-pip espeak-ng git && rm -rf /var/lib/apt/lists/*
5
+
6
+ # Definir diretório de trabalho
7
  WORKDIR /app
8
+
9
+ # Copiar arquivos
10
  COPY requirements.txt .
11
  COPY main.py .
12
+
13
+ # Instalar dependências do Python
14
  RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Pré-carregar o modelo Kokoro-82M
17
+ RUN python3 -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='hexgrad/Kokoro-82M', local_dir='/app/models')"
18
+
19
+ # Expor a porta 7860
20
  EXPOSE 7860
21
+
22
+ # Comando para executar a aplicação
23
  CMD ["python3", "main.py"]