Spaces:
Sleeping
Sleeping
File size: 446 Bytes
c5d79ed 2420b7f c5d79ed 2420b7f c5d79ed 2420b7f c5d79ed 2420b7f c5d79ed | 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.11-slim
# Create user first to prevent permission issues
RUN useradd -m -u 1000 user
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code with correct ownership
COPY --chown=user . .
# Switch to non-root user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
PYTHONPATH=/app
EXPOSE 7860
CMD ["python", "app/main.py"]
|