File size: 1,309 Bytes
18f9d1d |
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# ===============================
# Base image
# ===============================
FROM python:3.11-slim
# ===============================
# System dependencies for ML / audio / vision
# ===============================
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
ffmpeg \
libsndfile1 \
libjpeg-dev \
zlib1g-dev \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
# ===============================
# Upgrade pip
# ===============================
RUN python -m pip install --upgrade pip setuptools wheel
# ===============================
# Set working directory
# ===============================
WORKDIR /app
# ===============================
# Copy requirements
# ===============================
COPY requirements.txt .
# ===============================
# Install Python dependencies
# ===============================
RUN pip install --no-cache-dir -r requirements.txt
# ===============================
# Copy app source
# ===============================
COPY . .
# ===============================
# Expose FastAPI default port
# ===============================
EXPOSE 8000
# ===============================
# Default command
# ===============================
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] |