| | FROM python:3.10-slim |
| |
|
| | ENV PYTHONUNBUFFERED=1 |
| | WORKDIR /app |
| |
|
| | |
| | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| | git wget ffmpeg build-essential ca-certificates libsndfile1 \ |
| | && rm -rf /var/lib/apt/lists/* |
| |
|
| | |
| | RUN python -m pip install --upgrade pip setuptools wheel |
| |
|
| | |
| | RUN mkdir -p /app/model /app/config /app/vocab /app/output \ |
| | && chmod -R a+rwx /app/model /app/config /app/vocab /app/output |
| |
|
| | |
| | RUN useradd -m -u 1000 appuser || true \ |
| | && chown -R appuser:appuser /app |
| |
|
| | |
| | COPY requirements.txt /app/requirements.txt |
| | RUN pip install --no-cache-dir -r /app/requirements.txt |
| |
|
| | |
| | COPY app.py /app/app.py |
| |
|
| | |
| | USER appuser |
| |
|
| | EXPOSE 8000 |
| | CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] |
| |
|