Spaces:
Paused
Paused
File size: 738 Bytes
3c08420 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # 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"] |