Spaces:
Sleeping
Sleeping
File size: 439 Bytes
246f521 9bf50bf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
FROM python:3.12-slim
# Create non-root user
RUN useradd -m appuser
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy project files
COPY . .
# Change ownership to non-root user
RUN chown -R appuser:appuser /app
# Switch to non-root user
USER appuser
# Expose only main app port
EXPOSE 7860
# Start all three apps
CMD ["gunicorn", "-b", "0.0.0.0:7860", "main:app"] |