-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (19 loc) · 806 Bytes
/
Dockerfile
File metadata and controls
25 lines (19 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set environment variables to minimize the image size and improve logging
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# Set the working directory in the container
WORKDIR /usr/src/app
# Install necessary system packages for audio processing and compilation
RUN apt-get update \
&& apt-get install -y --no-install-recommends gcc libsndfile1 ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Copy the current directory contents into the container at /usr/src/app
COPY src/ ./src/
# Run the Uvicorn server
# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["python", "-m", "src.app.main"]