Spaces:
Sleeping
Sleeping
File size: 622 Bytes
91bed75 b211269 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# Dockerfile
# Use a standard Python 3.9 image
FROM python:3.9-slim
# Set the working directory inside the container
WORKDIR /app
# Copy the requirements file and install dependencies
COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy your application code into the container
COPY . .
# Tell the container to listen on port 7860 (the standard for HF Spaces)
EXPOSE 7860
# Command to run your Flask app using gunicorn web server
# This is more robust than Flask's built-in server
CMD [ "gunicorn" , "--bind" , "0.0.0.0:7860" , "--workers" , "1" , "--preload" , "app:app" ] |