From 5e0f5a70f3f4087107ed168ca351571f2cd1db69 Mon Sep 17 00:00:00 2001 From: "karlosarr@gmail.com" Date: Thu, 21 Dec 2023 10:18:26 -0700 Subject: [PATCH 01/24] dockerized this project --- Dockerfile | 15 +++++++++++++++ README.md | 28 +++++++++++++++++++++++++++- docker-compose.yml | 21 +++++++++++++++++++++ requirements.txt | 6 ++++++ 4 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..da22a72 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM nvcr.io/nvidia/l4t-pytorch:r35.1.0-pth1.13-py3 +RUN apt update +ARG DEBIAN_FRONTEND=noninteractive +RUN apt-get install -qq ffmpeg \ + libgtk2.0-0 libgtk2.0-common libportaudio2 \ + libportaudiocpp0 portaudio19-dev python3-pyaudio +RUN pip3 install git+https://github.com/openai/whisper.git +RUN pip3 install sounddevice +RUN pip3 install scipy +RUN pip3 install typing-extensions --upgrade +RUN mkdir -p /VA +WORKDIR /VA +COPY . /VA +RUN pip3 install -r ./requirements.txt +CMD python3 ./main.py diff --git a/README.md b/README.md index 3d4e650..73d409f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=karlosarr_asistente_local&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=karlosarr_asistente_local) + # Asistente Virtual Local Proyecto educativo ([Lista de reprodicción en Youtube](https://www.youtube.com/watch?v=SaoDps2QBsI&list=PLA050nq-BHwN5CJuPAsFkBTrW_4Xxso_4)) para poder correr un asistente virtual de manera local. Integra distintos modelos de machine learning para poder brindar distintas funcionalidades. @@ -42,6 +44,20 @@ python main.py ``` +# Ejecutar con docker compose desde la carpeta donde se clono este repositorio en la maquina huesped. +``` +# Consola interactiva con el contanedor +docker compose run --build --rm asistente bash + +ejecutar aplicación manualmente +python3 ./main.py +``` + +Ejecutar aplicación sin interación con la línea de comandos +``` +docker compose run --build --rm asistente +``` + ### x86 Ya instalado docker con NVIDIA container toolkit. @@ -57,14 +73,24 @@ cd /va python main.py ``` +# Consola interactiva con el contanedor +docker compose run --build --rm asistente bash + +ejecutar aplicación manualmente +python3 ./main.py +``` +Ejecutar aplicación sin interación con la línea de comandos +``` +docker compose run --build --rm asistente +``` ## Aportaciones Este proyecto esta abierto a aportaciones asi que si quieres mejorar o agregar funcionalidades haz un pull request. # To Do: - [X] Transcipción en tiempo real - [X] Detectar palabra clave para que el asistente sepa que se le esta hablando -- [ ] Crear Dockerfile para no requerir pull +- [X] Crear Dockerfile para no requerir pull - [ ] Modularizar el __init__ de la clase Asistente en distintas funciones - [ ] API OpenAI GPT-3 (No es local, pero su uso sera limitado) - [ ] Probar en Jetson Nano diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..25fe1af --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +version: '3' + +services: + + asistente: + build: + context: . + container_name: asistente + restart: always + runtime: nvidia + network_mode: "host" + stdin_open: true + tty: true + devices: + - /dev/snd:/dev/snd + ports: + - 8080:8080 + environment: + - NVIDIA_VISIBLE_DEVICES=all + volumes: + - ./:/VA diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..1f65200 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +pyyaml~=6.0 +SpeechRecognition~=3.10 +openai~=1.6.0 +gtts~=2.5.0 +pygame~=2.5.2 +#python3-pyaudio~=0.2.14 From 4aa0d2f724d9e2334321dc52185f72d4d3d5d938 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 11:00:07 -0700 Subject: [PATCH 02/24] Update Dockerfile --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index da22a72..144349d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM nvcr.io/nvidia/l4t-pytorch:r35.1.0-pth1.13-py3 RUN apt update ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get install -qq ffmpeg \ +RUN apt-get --no-install-recommends install -y ffmpeg \ libgtk2.0-0 libgtk2.0-common libportaudio2 \ libportaudiocpp0 portaudio19-dev python3-pyaudio RUN pip3 install git+https://github.com/openai/whisper.git @@ -10,6 +10,10 @@ RUN pip3 install scipy RUN pip3 install typing-extensions --upgrade RUN mkdir -p /VA WORKDIR /VA -COPY . /VA +COPY ./utils /VA/utils +COPY ./asistente.py /VA/asistente.py +COPY ./config.yaml /VA/config.yaml +COPY ./main.py /VA/main.py +COPY ./requirements.txt /VA/requirements.txt RUN pip3 install -r ./requirements.txt CMD python3 ./main.py From 3a80ae1da54c024dead8bf29eced599acf6a67cb Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 11:06:42 -0700 Subject: [PATCH 03/24] Update Dockerfile --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 144349d..959cad2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,10 @@ FROM nvcr.io/nvidia/l4t-pytorch:r35.1.0-pth1.13-py3 -RUN apt update ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get --no-install-recommends install -y ffmpeg \ +RUN apt-get update && \ + apt-get --no-install-recommends install -y ffmpeg \ libgtk2.0-0 libgtk2.0-common libportaudio2 \ - libportaudiocpp0 portaudio19-dev python3-pyaudio + libportaudiocpp0 portaudio19-dev python3-pyaudio \ + apt-get clean RUN pip3 install git+https://github.com/openai/whisper.git RUN pip3 install sounddevice RUN pip3 install scipy From c4d1d3b68ebc26838aa1c96f963c0b6c9706d64a Mon Sep 17 00:00:00 2001 From: "karlosarr@gmail.com" Date: Thu, 21 Dec 2023 11:20:29 -0700 Subject: [PATCH 04/24] dockerized this project --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 959cad2..f2cd691 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ apt-get --no-install-recommends install -y ffmpeg \ libgtk2.0-0 libgtk2.0-common libportaudio2 \ - libportaudiocpp0 portaudio19-dev python3-pyaudio \ + libportaudiocpp0 portaudio19-dev python3-pyaudio && \ apt-get clean RUN pip3 install git+https://github.com/openai/whisper.git RUN pip3 install sounddevice From f2030f9278c018d04a20df5040555b0caf3e4da1 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 11:29:32 -0700 Subject: [PATCH 05/24] Create sonarcloud.yml --- .github/workflows/sonarcloud.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/sonarcloud.yml diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml new file mode 100644 index 0000000..5f896a6 --- /dev/null +++ b/.github/workflows/sonarcloud.yml @@ -0,0 +1,20 @@ +name: Build +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] +jobs: + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 10afae912eca69d92349e9a1e527ba4acf0a5840 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 11:31:11 -0700 Subject: [PATCH 06/24] Create sonar-project.properties --- sonar-project.properties | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..59ac881 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,13 @@ +sonar.projectKey=karlosarr_asistente_local +sonar.organization=karlosarr + +# This is the name and version displayed in the SonarCloud UI. +sonar.projectName=asistente_local +#sonar.projectVersion=1.0 + + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +sonar.sources=. + +# Encoding of the source code. Default is default system encoding +sonar.sourceEncoding=UTF-8 From c98f5a4f3d0bd8decd311b16cd78b80fd2861b3d Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 11:42:48 -0700 Subject: [PATCH 07/24] Create docker-publish.yml --- .github/workflows/docker-publish.yml | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/docker-publish.yml diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..b279bf5 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,44 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# GitHub recommends pinning actions to a commit SHA. +# To get a newer version, you will need to update the SHA. +# You can also reference a tag or branch, but the action may change without warning. + +name: Publish Docker image + +on: + push: + branches: + - master + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Log in to Docker Hub + uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: karlosarr/asistente-local + + - name: Build and push Docker image + uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 + with: + context: . + file: ./Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From 4d8a1bc215c7b0ec9b3bdded87eb457cc206d106 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 12:09:50 -0700 Subject: [PATCH 08/24] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index b279bf5..1deb882 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -42,3 +42,5 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + arch: armv7 + distro: ubuntu22.04 From 21b7a8b21a1426306a9a8abba9e80a7b1c6ea14c Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 12:17:16 -0700 Subject: [PATCH 09/24] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 1deb882..b460920 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -23,24 +23,23 @@ jobs: uses: actions/checkout@v4 - name: Log in to Docker Hub - uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a + uses: docker/login-action@v3.0.0 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + uses: docker/metadata-action@v5.4.0 with: images: karlosarr/asistente-local - name: Build and push Docker image - uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 + uses: docker/build-push-action@v6.2 with: context: . file: ./Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - arch: armv7 - distro: ubuntu22.04 + platforms: linux/amd64,linux/arm64 From 72af3915dd20cfb540cf3430def4f13fe594f351 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 12:21:02 -0700 Subject: [PATCH 10/24] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index b460920..99f5444 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -35,7 +35,7 @@ jobs: images: karlosarr/asistente-local - name: Build and push Docker image - uses: docker/build-push-action@v6.2 + uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile From bf33d8927f245d5d1934d8787f5b541f38037b70 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 12:22:54 -0700 Subject: [PATCH 11/24] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 99f5444..5e3205b 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -42,4 +42,4 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - platforms: linux/amd64,linux/arm64 + platforms: linux/arm64 From 7d2542ed08379214898a8f592e0da13bbc9eaf16 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 14:06:34 -0700 Subject: [PATCH 12/24] Update Dockerfile --- Dockerfile | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index f2cd691..794dd75 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,19 @@ FROM nvcr.io/nvidia/l4t-pytorch:r35.1.0-pth1.13-py3 ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get update && \ - apt-get --no-install-recommends install -y ffmpeg \ - libgtk2.0-0 libgtk2.0-common libportaudio2 \ - libportaudiocpp0 portaudio19-dev python3-pyaudio && \ - apt-get clean +#RUN apt-get update && \ +# apt-get --no-install-recommends install -y ffmpeg \ +# libgtk2.0-0 libgtk2.0-common libportaudio2 \ +# libportaudiocpp0 portaudio19-dev python3-pyaudio && \ +# apt-get clean +RUN apt-get update +RUN apt-get --no-install-recommends install -y ffmpeg +RUN apt-get --no-install-recommends install -y libgtk2.0-0 +RUN apt-get --no-install-recommends install -y libgtk2.0-common +RUN apt-get --no-install-recommends install -y libportaudio2 +RUN apt-get --no-install-recommends install -y libportaudiocpp0 +RUN apt-get --no-install-recommends install -y portaudio19-dev +RUN apt-get --no-install-recommends install -y python3-pyaudio +RUN apt-get clean RUN pip3 install git+https://github.com/openai/whisper.git RUN pip3 install sounddevice RUN pip3 install scipy From 21d09d0c52e4ec41143bc1d0c4d518d33b27df11 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 14:12:45 -0700 Subject: [PATCH 13/24] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 5e3205b..eaf3ec4 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -36,6 +36,8 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@v5 + env: + DOCKER_BUILDKIT: 0 with: context: . file: ./Dockerfile From 1f5f863e4bef114e3340ee17ca3b97e2ae655874 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 14:15:18 -0700 Subject: [PATCH 14/24] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 794dd75..4a152ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive # libgtk2.0-0 libgtk2.0-common libportaudio2 \ # libportaudiocpp0 portaudio19-dev python3-pyaudio && \ # apt-get clean -RUN apt-get update +#RUN apt-get update RUN apt-get --no-install-recommends install -y ffmpeg RUN apt-get --no-install-recommends install -y libgtk2.0-0 RUN apt-get --no-install-recommends install -y libgtk2.0-common From 8b35802eb83e7dfa28893a4fe017597712887856 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 14:20:15 -0700 Subject: [PATCH 15/24] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index eaf3ec4..1de7489 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -37,7 +37,7 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@v5 env: - DOCKER_BUILDKIT: 0 + DOCKER_BUILDKIT: 1 with: context: . file: ./Dockerfile From fad3284ca14a71bb275581edef9083bdac5fde4f Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 14:23:17 -0700 Subject: [PATCH 16/24] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 1de7489..36b42c6 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -44,4 +44,4 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - platforms: linux/arm64 + #platforms: linux/arm64 From 9b752397944b8890a935c446cf7c1ed7daa86f3a Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 14:27:05 -0700 Subject: [PATCH 17/24] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 36b42c6..1de7489 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -44,4 +44,4 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - #platforms: linux/arm64 + platforms: linux/arm64 From 9c96b78abd4b6b6bcc027c6e3ae3c39269c5b0fe Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 14:29:23 -0700 Subject: [PATCH 18/24] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4a152ab..794dd75 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive # libgtk2.0-0 libgtk2.0-common libportaudio2 \ # libportaudiocpp0 portaudio19-dev python3-pyaudio && \ # apt-get clean -#RUN apt-get update +RUN apt-get update RUN apt-get --no-install-recommends install -y ffmpeg RUN apt-get --no-install-recommends install -y libgtk2.0-0 RUN apt-get --no-install-recommends install -y libgtk2.0-common From 2be88ccd90103f0d8addcc217926768dddd045eb Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 14:34:42 -0700 Subject: [PATCH 19/24] Update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 794dd75..1ef14e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive # libgtk2.0-0 libgtk2.0-common libportaudio2 \ # libportaudiocpp0 portaudio19-dev python3-pyaudio && \ # apt-get clean +RUN apt-get clean RUN apt-get update RUN apt-get --no-install-recommends install -y ffmpeg RUN apt-get --no-install-recommends install -y libgtk2.0-0 From b12e0ef684269e94c149b664848f3889ed50b60a Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 14:40:54 -0700 Subject: [PATCH 20/24] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1ef14e5..d237dd3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive # libgtk2.0-0 libgtk2.0-common libportaudio2 \ # libportaudiocpp0 portaudio19-dev python3-pyaudio && \ # apt-get clean -RUN apt-get clean +RUN rm /etc/apt/sources.list.d/cuda*.list RUN apt-get update RUN apt-get --no-install-recommends install -y ffmpeg RUN apt-get --no-install-recommends install -y libgtk2.0-0 From 504c7f70762ee30def7add314ca9b6964d1b06fd Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 14:48:54 -0700 Subject: [PATCH 21/24] Update Dockerfile --- Dockerfile | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index d237dd3..06936da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,12 @@ FROM nvcr.io/nvidia/l4t-pytorch:r35.1.0-pth1.13-py3 +LABEL maintainer="Carlos Ruiz " ARG DEBIAN_FRONTEND=noninteractive -#RUN apt-get update && \ -# apt-get --no-install-recommends install -y ffmpeg \ -# libgtk2.0-0 libgtk2.0-common libportaudio2 \ -# libportaudiocpp0 portaudio19-dev python3-pyaudio && \ -# apt-get clean -RUN rm /etc/apt/sources.list.d/cuda*.list -RUN apt-get update -RUN apt-get --no-install-recommends install -y ffmpeg -RUN apt-get --no-install-recommends install -y libgtk2.0-0 -RUN apt-get --no-install-recommends install -y libgtk2.0-common -RUN apt-get --no-install-recommends install -y libportaudio2 -RUN apt-get --no-install-recommends install -y libportaudiocpp0 -RUN apt-get --no-install-recommends install -y portaudio19-dev -RUN apt-get --no-install-recommends install -y python3-pyaudio -RUN apt-get clean +RUN whoami +RUN apt-get update && \ + apt-get --no-install-recommends install -y ffmpeg \ + libgtk2.0-0 libgtk2.0-common libportaudio2 \ + libportaudiocpp0 portaudio19-dev python3-pyaudio && \ + apt-get clean RUN pip3 install git+https://github.com/openai/whisper.git RUN pip3 install sounddevice RUN pip3 install scipy From 65ee32950664b80fff59d759c374f564871ac966 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 21 Dec 2023 14:51:49 -0700 Subject: [PATCH 22/24] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 73d409f..415dd7a 100644 --- a/README.md +++ b/README.md @@ -44,12 +44,11 @@ python main.py ``` -# Ejecutar con docker compose desde la carpeta donde se clono este repositorio en la maquina huesped. ``` -# Consola interactiva con el contanedor +# Ejecutar con docker compose desde la carpeta donde se clono este repositorio en la maquina huesped. docker compose run --build --rm asistente bash -ejecutar aplicación manualmente +# Ejecutar aplicación manualmente python3 ./main.py ``` From 37ee79601aba1a2f7269a0d1a4409e1774ed9d5c Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 22 Dec 2023 11:22:53 -0700 Subject: [PATCH 23/24] Update sonar-project.properties --- sonar-project.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/sonar-project.properties b/sonar-project.properties index 59ac881..cf2bca4 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -11,3 +11,4 @@ sonar.sources=. # Encoding of the source code. Default is default system encoding sonar.sourceEncoding=UTF-8 +sonar.python.version=3.8 From 63bc3198419936ca4ea13ac3f9d699f663ead99c Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 22 Dec 2023 12:26:08 -0700 Subject: [PATCH 24/24] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 06936da..80748db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM nvcr.io/nvidia/l4t-pytorch:r35.1.0-pth1.13-py3 LABEL maintainer="Carlos Ruiz " ARG DEBIAN_FRONTEND=noninteractive -RUN whoami +RUN apt-get install qemu-arm-static RUN apt-get update && \ apt-get --no-install-recommends install -y ffmpeg \ libgtk2.0-0 libgtk2.0-common libportaudio2 \