Ass3 / Dockerfile
launch-calcium's picture
Upload 6 files
3c08420 verified
Raw
History Blame Contribute Delete
738 Bytes
# Dockerfile
FROM python:3.11-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential git wget libsndfile1 libjpeg-dev && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --upgrade pip
# Optional: install a CPU-optimized torch wheel first if you have a specific index
# RUN pip install --index-url https://download.pytorch.org/whl/cpu torch
RUN pip install -r requirements.txt
COPY server.py .
# Do NOT copy model files into the image. Mount them at runtime:
# docker run -v /path/to/onnx_models_quant:/app/onnx_models_quant
EXPOSE 8000
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"]