eczemanage / Dockerfile
RezinWiz's picture
Update Dockerfile
80d068e verified
raw
history blame contribute delete
575 Bytes
FROM python:3.9-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files (model will download on first startup)
COPY api.py .
COPY trained_model ./trained_model
# Expose port
EXPOSE 8000
# Start server (model downloads during first startup, cached for future restarts)
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "8000"]