File size: 576 Bytes
b689099 b7e593a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | FROM python:3.9
# Set working directory to /code
WORKDIR /code
# Copy requirements first (better caching)
COPY ./requirements.txt /code/requirements.txt
# Install dependencies
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy the rest of the application
COPY . /code
# Create directory for uploads and set permissions to 777
# This is CRITICAL for file uploads to work on Hugging Face
RUN mkdir -p /code/static/uploads && chmod -R 777 /code/static
# Start the app on port 7860
CMD ["gunicorn", "-b", "0.0.0.0:7860", "--timeout", "600", "app:app"] |