Spaces:
Sleeping
Sleeping
File size: 398 Bytes
4991c1b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
FROM python:3.9-slim
# Create a non-root user
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user
WORKDIR $HOME/app
# Copy and install dependencies
COPY --chown=user requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY --chown=user . .
# Expose the application port
EXPOSE 7860
# Run the application
CMD ["python", "app.py"]
|