diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..0b217d0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,15 @@ +.git +.idea +.venv +__pycache__ +*.pyc +*.pyo +*.pyd +.Python +.env +.env.* +output/ +data/ +ffmpeg-release-amd64-static.tar.xz +*.tar.xz +*.log diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7f5a6c3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +FROM python:3.11-slim + +ENV PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 \ + PIP_NO_CACHE_DIR=1 + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + ffmpeg \ + libsndfile1 \ + libgl1 \ + libgomp1 \ + fonts-noto-core \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /app + +COPY requirements.txt ./ +RUN pip install --upgrade pip \ + && pip install -r requirements.txt + +COPY . . + +ENV ENABLE_SPEAKER_DIARIZATION=false + +EXPOSE 8000 + +CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..193b4f0 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +services: + app: + build: . + ports: + - "8000:8000" + env_file: + - .env + volumes: + - ./output:/app/output + - ./data:/app/data