Skip to content
Snippets Groups Projects
Dockerfile 824 B
#FROM python:slim-bookworm
FROM python:3.11-slim-bookworm

# install git and audio stuff
RUN apt-get update
RUN apt-get install -y --no-install-recommends git
RUN apt-get install -y --no-install-recommends alsa-utils
RUN apt-get install -y --no-install-recommends pipewire
RUN apt-get install -y --no-install-recommends pipewire-alsa
RUN apt-get install -y --no-install-recommends libportaudio2
RUN apt-get install -y --no-install-recommends ffmpeg

# clean up apt
RUN rm -rf /var/lib/apt/lists/*

WORKDIR /code

# setup python
COPY ./requirements.txt /code/requirements.txt
RUN pip3 install --no-cache-dir -r /code/requirements.txt

# copy app source code and git-context
COPY ./app /code/app
COPY ./.git /code/.git

# start app
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--root-path", "/api"]