category / Dockerfile
Abhishek7356
updated code
dadaf42
raw
history blame contribute delete
558 Bytes
# Use a lightweight Python base image
FROM python:3.10-slim
# Set the working directory
WORKDIR /app
# Copy all project files
COPY . /app
# Install system dependencies (optional: if you need them)
# RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Expose the Flask port
EXPOSE 7860
# Set Flask environment variables
# ENV FLASK_RUN_HOST=0.0.0.0
# ENV FLASK_RUN_PORT=7860
# Run the Flask app
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]