fathos82 commited on
Commit
f1e30a7
·
verified ·
1 Parent(s): 42f21c9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -53
Dockerfile CHANGED
@@ -1,64 +1,27 @@
1
- FROM fathos82/intel-extension-for-pytorch:v1.0
2
- ENV PATH="/root/miniforge3/envs/py310/bin:$PATH"
 
 
 
 
3
 
4
- # Dependências da sua API
5
- RUN apt-get update && \
6
- apt-get install -y --no-install-recommends \
7
- libpq-dev gcc curl python3-dev musl-dev espeak \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
- # WORKDIR da sua API
11
  WORKDIR /usr/src/app
12
 
13
- # Instalação do seu projetoz
14
- COPY requirements.txt .
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
-
18
- # Installing 'resemblyzer' without dependencies using '--no-deps' to prevent it from overwriting
19
- # the currently installed version of PyTorch (pytorch + cpu). Other dependencies such as librosa, numpy, scipy,
20
- # typing, and webrtcvad are being installed normally in the 'requirements.txt' file.
21
- RUN pip install --no-cache-dir --no-deps Resemblyzer==0.1.4
22
-
23
- RUN chmod +x /usr/local/bin/entrypoint.sh
24
-
25
- RUN chmod 777 ./error.log
26
- RUN chmod 777 ./requests.log
27
-
28
- RUN chmod 777 /usr/src/app/error.log
29
- RUN chmod 777 /usr/src/app/requests.log
30
-
31
  COPY . .
32
- # Configurações finais'
33
- #ENV GUNICORN_WORKERS=1
34
- EXPOSE 8000
35
- ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
36
- CMD ["sh", "-c", "gunicorn --log-level=warning --access-logfile - --error-logfile - rose_tts_api.wsgi:application --workers $GUNICORN_WORKERS --timeout 70 --bind 0.0.0.0:8000"]
37
-
38
- # CASO FOR SUBIR ESSA VERSÃO ADICIONAR PYTORCH EM requirements.txt
39
-
40
- # FROM python:3.11-slim
41
-
42
- # # Definindo a variável de ambiente corretamente
43
- # ENV GUNICORN_WORKERS=1
44
-
45
- # # Instalação de dependências do sistema
46
- # RUN apt-get update && apt-get install -y --no-install-recommends \
47
- # libpq-dev gcc curl python3-dev musl-dev \
48
- # && apt-get install -y espeak \
49
- # && rm -rf /var/lib/apt/lists/*
50
-
51
- # WORKDIR /usr/src/app
52
-
53
- # # Copia o arquivo de dependências e instala
54
- # COPY requirements.txt ./
55
- # RUN pip install --no-cache-dir -r requirements.txt
56
-
57
- # # Copia o código do projeto
58
- # COPY . .
59
 
60
  # # Expondo a porta 8000 para o Gunicorn
61
- # EXPOSE 8000
62
 
63
- # # Comando para iniciar o servidor com Gunicorn, usando 'sh -c' para interpolação correta da variável
64
- # CMD ["sh", "-c", "gunicorn --log-level=warning --access-logfile - --error-logfile - rose_tts_api.wsgi:application --workers $GUNICORN_WORKERS --timeout 70 --bind 0.0.0.0:8000"]
 
1
+ # CASO FOR SUBIR ESSA VERSÃO ADICIONAR PYTORCH EM requirements.txt
2
+
3
+ FROM python:3.11-slim
4
+
5
+ # Definindo a variável de ambiente corretamente
6
+ ENV GUNICORN_WORKERS=1
7
 
8
+ # Instalação de dependências do sistema
9
+ RUN apt-get update && apt-get install -y --no-install-recommends \
10
+ libpq-dev gcc curl python3-dev musl-dev \
11
+ && apt-get install -y espeak \
12
  && rm -rf /var/lib/apt/lists/*
13
 
 
14
  WORKDIR /usr/src/app
15
 
16
+ # Copia o arquivo de dependências e instala
17
+ COPY requirements.txt ./
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
+ # Copia o código do projeto
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  COPY . .
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  # # Expondo a porta 8000 para o Gunicorn
24
+ EXPOSE 8000
25
 
26
+ # Comando para iniciar o servidor com Gunicorn, usando 'sh -c' para interpolação correta da variável
27
+ CMD ["sh", "-c", "gunicorn --log-level=warning --access-logfile - --error-logfile - rose_tts_api.wsgi:application --workers $GUNICORN_WORKERS --timeout 70 --bind 0.0.0.0:8000"]