Spaces:
Sleeping
Sleeping
File size: 402 Bytes
76ee95f 253cabf 76ee95f 253cabf 76ee95f 253cabf 76ee95f 253cabf 76ee95f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | FROM python:3.9-slim
WORKDIR /app
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create a non-root user
RUN useradd -m -u 1000 user && \
chown -R user:user /app && \
chmod -R 777 /app
USER user
# Expose port
EXPOSE 7860
# Run the application
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
|