Skip to content

Commit

Permalink
mudancas para versao do leao funfar no docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Lex committed Feb 19, 2024
1 parent a012fe8 commit 460a200
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Dockerfile
FROM python:3.8
FROM python:3.9

# Instale as dependências necessárias para OpenBLAS e pip (se precisar)
RUN apt-get update && apt-get install -y \
Expand All @@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y \

# Copy requirements file and install dependencies
COPY app/requirements.txt .
RUN trickled
RUN trickle -d 20480 pip install --no-cache-dir -r requirements.txt

# Instale o pacote Python com os argumentos CMake
Expand All @@ -16,4 +17,4 @@ RUN CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-
# Copy your application code
WORKDIR /app
ENV FLASK_APP=app
#CMD ["gunicorn", "-w 1", "-k eventlet", "-b", "0.0.0.0:5000", "--timeout", "120", "app:app"]
#CMD ["gunicorn", "-w 1", "-k eventlet", "-b", "0.0.0.0:5000", "--timeout", "120", "app:app"]
2 changes: 1 addition & 1 deletion app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,4 +251,4 @@ def message_task(current_agent, user_input, room):
socketio.emit('end_message', room=room) # Envia para o room especificado

if __name__ == "__main__":
socketio.run(app, host='0.0.0.0', port=5001, debug=True)
socketio.run(app, host='0.0.0.0', port=5000, debug=True)
3 changes: 2 additions & 1 deletion app/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ openai-whisper

twilio
firebase_admin
langchain-community
langchain-community
langchain-openai
10 changes: 7 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ services:
- 5000:5000
environment:
OPENAI_API_KEY: $OPENAI_APIKEY
WEAVIATE_URL: 'http://localhost:8080'
WEAVIATE_URL: $WEAVIATE_URL
WEAVIATE_API_KEY: $WEAVIATE_API_KEY
TWILIO_SID: $TWILIO_SID
TWILIO_TOKEN: $TWILIO_TOKEN

depends_on:
- weaviate
volumes:
Expand All @@ -41,7 +45,7 @@ services:
context: .
dockerfile: Dockerfile.nginx
ports:
- 80:80
- 1337:80
- 443:443
depends_on:
- flask-app
- flask-app
2 changes: 1 addition & 1 deletion nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ events {

http {
server {
listen 80;
listen 1337;
return 301 https://$host$request_uri;
}

Expand Down
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ As seguintes dependências são necessárias para executar o projeto:
- twilio
- firebase_admin
- langchain-community
- langchain-openai

Instale as dependências usando:

Expand Down Expand Up @@ -59,4 +60,4 @@ Este projeto está aberto a contribuições. Sinta-se à vontade para abrir issu

## Licença

Ainda não definida.
Ainda não definida.

0 comments on commit 460a200

Please sign in to comment.