prediction / Dockerfile
fahadcr14
final
6729203
raw
history blame
467 Bytes
# Use a lightweight Python base image
FROM python:3.11.6-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Install dependencies
WORKDIR /app
COPY requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt
# Install Gunicorn
RUN pip install gunicorn
# Copy app files
COPY . /app
# Expose the port Flask will run on
EXPOSE 5000
# Run the app with Gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]