Spaces:
Sleeping
Sleeping
File size: 516 Bytes
ce06082 71faf97 ce06082 71faf97 ce06082 71faf97 ce06082 71faf97 ce06082 71faf97 ce06082 71faf97 |
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
# Create a non-root user
RUN useradd -m -u 1000 user
# Set environment variables
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set working directory
WORKDIR $HOME/app
# Copy requirements and install dependencies
COPY --chown=user requirements.txt $HOME/app/requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copy the rest of the application
COPY --chown=user . $HOME/app
# Expose the port
EXPOSE 7860
# Run the application
CMD ["python", "app.py"]
|