voice-ai-frontend / Dockerfile
Anustup's picture
Update Dockerfile
9361377 verified
FROM ubuntu:20.04
# Set the working directory to /app
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libpq-dev \
curl \
git \
libportaudio2 \
sudo \
python3 \
python3-pip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Homebrew (Brew)
RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Add Homebrew to the PATH
ENV PATH="/home/linuxbrew/.linuxbrew/bin:${PATH}"
ENV MANPATH="/home/linuxbrew/.linuxbrew/share/man:${MANPATH}"
ENV INFOPATH="/home/linuxbrew/.linuxbrew/share/info:${INFOPATH}"
# Install PortAudio using Homebrew
# RUN brew install portaudio
# Set up Homebrew Python
ENV PATH="/home/linuxbrew/.linuxbrew/opt/[email protected]/bin:${PATH}"
# Run python3 -m pip install pyaudio
# Copy the current directory contents into the container at /app
COPY . /app
RUN sudo apt-get install portaudio19-dev python-all-dev python3-all-dev && sudo pip3 install pyaudio
# Install Python dependencies specified in requirements.txt
RUN python3 -m pip install --no-cache-dir -r requirements.txt
# Make port 8501 available to the world outside this container
EXPOSE 8501
# Define environment variable
ENV NAME World
# Run app.py when the container launches
CMD ["streamlit", "run", "app.py"]