File size: 496 Bytes
6a76ccd 15d4a08 6a76ccd 15d4a08 6a76ccd 15d4a08 6a76ccd 28fd702 15d4a08 359f7b1 fee8ec1 15d4a08 6a76ccd 09b282e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Use an official lightweight Python image
FROM python:3.9-slim
# Set the working directory inside the container
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt .
# Install the Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the Flask API script into the container
COPY app.py .
# Expose the port the app runs
EXPOSE 7860
# Command to run the application using Gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
|