Spaces:
Running
Running
# Use Python base image | |
FROM python:3.10-slim | |
# Set working directory | |
WORKDIR /app | |
# Copy requirements and install dependencies | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy rest of the code | |
COPY . . | |
# Expose the port used by the Flask app | |
EXPOSE 7860 | |
# Define environment variable for Flask | |
ENV FLASK_APP=app.py | |
# Start the Flask app | |
CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"] | |