File size: 463 Bytes
20076d4 d12bcd0 20076d4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | FROM python:3.12-slim
RUN useradd -m -u 1000 user
RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 && rm -rf /var/lib/apt/lists/*
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=user models/ ./models/
COPY --chown=user inference_server.py .
ENV MODEL_DIR=/app/models
EXPOSE 7860
CMD ["python", "inference_server.py"]
|