Skip to content

Added and configured Dockerfile #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM python:3.8-slim


RUN apt-get update && apt-get install -y \
portaudio19-dev \
gcc \
tk

COPY requirements.txt .

COPY . .

ENV PIP_ROOT_USER_ACTION=ignore

RUN python -m pip install --upgrade pip && \
python -m pip install -r requirements.txt


CMD ["Spectogram.py"]
ENTRYPOINT ["python3"]
3 changes: 3 additions & 0 deletions Waveform.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@
TIMEOUT = 10 # In ms for the event loop
pAud = pyaudio.PyAudio()

# FUNCTIONS:

try:
pAud.get_device_info_by_index(0)
except pyaudio.CoreError as e:
print(f"Error initializing PyAudio: {e}")
pAud = None


# PySimpleGUI plots:
def drawAxis(dataRangeMin=0, dataRangeMax=100):

Expand Down